merge-markdown
merge-markdown copied to clipboard
manifest of manifests
A manifest should also be able to take in other manifests and rerun the process. Here's how it would work: Input:
- manifest1.json
- manifest.json Output:
- final.md
The tool would recognize it's a manifest file and recursively call the merge.js script. merge-js produces a moduleFinal.md file that is now taken in as the inputFile.
input:
manifest1.md
manifest2.md
output:
name: final.md
Either:
- ALL options are ignored.
- Options are applied AFTER input manifests have produced an output file
👍 This would be a useful feature.
I'm running into this exact problem now where I have multiple manifests to import different Markdown files in different ways depending on the use case. As a result, I have to manually update multiple manifest files each time something changes.
Being able to have the manifest data downstream to roll into a primary manifest upstream would be ideal. I was thinking of using an include
option or something to indicate that these files add additional functionality to the upstream manifest.
Example upstream manifest:
input:
file01.md: ""
file02.md: ""
output:
name: merged.md
replaceInclude:
example01.md
example02.md
example03.md
replace:
<!--{exampleReplace01}-->: Example One
<!--{exampleReplace02}--: Example Two
Example downstream manifest example01.md:
replace:
<!--{exampleReplace03}-->: Example Three
<!--{exampleReplace04}--: Example Four