I want to convert a Word document to Markdown, so I can use the result with Jekyll.
This works partially:
pandoc "in.docx" -f docx -t markdown -o "out.md"
However, pandoc doesn't generate a (YAML) Front Matter block, and I can't find a command line option to do this. Is this possible at all, or is it only available for Latex or other formats?
In principle, the
--standalone
/-s
flag should generate the YAML frontmatter. However, docx documents often don't contain machine readable metadata, and pandoc only tries to extract some basic data from the main text -- with varying success. So it's possible that there will no YAML block even when pandoc is called with-s
.