Dylan Kinnett
Dylan Kinnett

Reputation: 240

Use Pandoc to create YAML Metadata from HTML META Tags

I have a batch of HTML files. Each has its own title and description in the standard HTML meta tags. I'd like to convert them all to Markdown, but I'd like to retain that metadata, in the form of a YAML metadata header, at the top of the resulting markdown files. Is it possible to do this with Pandoc?

Upvotes: 4

Views: 937

Answers (1)

John MacFarlane
John MacFarlane

Reputation: 8937

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

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

Upvotes: 6

Related Questions