knennigtri/merge-markdown

Add output options to output

Closed this issue · 0 comments

Currently output options are mixed in with global options. Ideally the output needs to read something like:

  • if manifest.output===string then manifest.output = name, else look for manifest.output.name
  • pandoc options = manifest.output.pandoc || manifest.pandoc
  • wkhtmltopdf options = manifest.output.wkhtmltopdf || manifest.wkhtmltopdf
  • mergedTOC = manifest.output.mergedTOC || manifest.TOC

Ideally they should be nested under output:

---
input:
 ../../frontmatter.md: ''
 mymodule.md: {noYAML: true, TOC: true, replace: {<!--#-->: "Module 1:"}}
output: 
 name: "merged/mymerged.md"
 mergedTOC: true
 pandoc:
  css: -c main.css
  latexTemplate: --template template.latex
  title: -M title:Example
 wkhtmltopdf:
  marginBottom: 1in
  marginTop: 1in
  marginLeft: .7in
  marginRight: .7in
  pageSize: Letter
  footerLine: true
  footerCenter: Page [page]
qa: {exclude: "(frontmatter)"}
replace:
 <!--{copyrightYear}-->: 2022
 <!--{timestamp}-->: 10/22/2022
 <!--{returnToMainTOC}-->: "[Return to Course Contents](#course-contents)"
 <!--{courseType}-->: Activity Guide
 <!--{courseTitle}-->: My Course Title
 <!--{courseCreator}-->: The Merge Company
 <!--{author}-->: Ronan Boxer
---