merge-markdown icon indicating copy to clipboard operation
merge-markdown copied to clipboard

manifest of manifests

Open knennigtri opened this issue 3 years ago • 2 comments

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.

knennigtri avatar Jun 25 '21 17:06 knennigtri

input:
 manifest1.md
 manifest2.md
output:
 name: final.md

Either:

  1. ALL options are ignored.
  2. Options are applied AFTER input manifests have produced an output file

knennigtri avatar Sep 20 '22 18:09 knennigtri

👍 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

eengelking avatar Feb 08 '23 18:02 eengelking