markdown - Pandoc - Insert separator between files -
I am trying to use pandoc to merge a group of markdown files into a single HTML document. Each file is for a different class lecture, and my goal is to mark a & lt; Hr & gt; tag is inserted, so it is easy to see that the lecture breaks
I know that it is possible to manually add breaks, or to style HTML, as if every new There is also the rule of the header tag, but I want to know how to do it only with Pandok.
>My current command looks like this:
pandok * MD & gt; Output.html
I tried to use the -a flag, but it inserts some after the whole body, while I use it for each markdown document I want to add the middle rule.
I know that this can not be possible (if Pandok is involved before processing), and in that case, I can pre-process the files with another script.
In short, I want a way to do this
[01.md]
This is not what I'm hoping for But I realized that to use gnu-sed , simply pincode the & lt; Hr & gt; Before inserting the tag, the markerdown document will add the separator.
Additional new lines are to ensure that the separator is on its line and the MD file ends with a new line so that pandoc works properly
sed -s '$ a \\ n-- - \ n' *. MD | Pandok-F Markdowns & gt; Output.html Solution from the previous one
Note: For OSX, you must install Fluffy gnu-sed and < Gsed instead of code> sed
Comments
Post a Comment