Use Pandoc to Create YAML Metadata from HTML META Tags

I have a package of HTML files. Each of them has its own title and description in standard HTML meta tags. I would like to convert them all to Markdown, but I would like to save this metadata as a YAML metadata header at the top of the resulting markup files. Is it possible to do this with Pandoc?

+4
source share
1 answer

Yes, pandoc will do this, but only if you are using version 1.12.3 or later.

pandoc -f html -t markdown -s input.html -o output.md
+5
source

Source: https://habr.com/ru/post/1535054/


All Articles