Pandoc¶
Info
Pandoc can be installed on Windows, macOS and Linux by following the instructions here.
A swiss-army knife to convert content between many file formats.
It allows for conversion between the following file formats:
- Markup formats
- HTML formats
- Ebooks
- XML formats
- \TeX formats
- Word processor formats
- Interactive notebook formats and many more...
Demo: Converting from Markdown to HTML¶
We have a Markdown file demo.md
in ~/Documents
and we want to convert it into a HTML file with the HTML <title>
tag 'Demo'
.
- Open Command Prompt. Win+ R , cmd , Enter
- Navigate to
~/Documents
. cd , Space, Documents, Enter - Convert the Markdown file:
1 | pandoc demo.md -f markdown -t html -s -o demo.html --metadata pagetitle="Demo" |
-f markdown
: Convertsdemo.md
from a Markdown file.-t html
: Convertsdemo.md
to a HTML file.-s
: Creates a standalone file.-o demo.html
: Put the output in the filedemo.html
.--metadata pagetitle="Demo"
:demo.html
will have the page title "Demo".