knennigtri/merge-markdown

merging nested md files

Closed this issue · 4 comments

Hello there! Thanks for creating this. May I know how can I merge all md files in a directory including those in sub-directories?

You manifest would look something the below... because the manifest controls which files are included (and what order), you have to explicitly write each file out:

---
input:
 frontmatter.md: {...}
 subfolder1/m1-example.md: {...}
 subfolder2/m2-example.md: {...}
 anotherFolder/myfolder/anotherExample.md: {...}
 C:/this/is/an/absolute/path/myFile.md: {...}
output: 
 name: merged/myOutput.md

Hey, thanks for the response. What if it is not possible to write out the full name of every file? There are more than 1000 markdown files in my collection.

In the current version of it, you have to explicitly specify the name and order of every file.... can you give me an example of a manifest file that could satisfy your needs? I'll then see if I can write some logic for it. Remember, the point of the manifest file is it determine the order of the merge so that regex would have to follow that.

hmm the order doesn't matter for my use case. I just need the files merged. It's OK! I guess that's not your intention for this package! I will hack together something myself to traverse the directories and dump the files together! Thanks for your response (: