Managing Documents with pandoc
Learn how to convert documents into different formats using pandoc.
We'll cover the following
Converting files
If we work with text-based documents, pandoc
can be a lifesaver. We can use pandoc
to convert documents from one format to another. Let’s use it to convert a Markdown document to HTML and back.
First, we install pandoc
with our package manager:
$ sudo apt install pandoc
Now, we create a new Markdown document called hello.md
in our home directory with this content:
## Welcome
This is a simple Markdown document.
It has a [link to Google](http://google.com) in it.
We use pandoc
to convert this file to HTML:
$ pandoc -f markdown -t html -o hello.html hello.md
Get hands-on with 1400+ tech skills courses.