Rendering markdown as PDF

Here's the md2pdf. Needs pandoc and xelatex:

#!/bin/bash
pandoc "$1" -o "${1%.md}.pdf" --pdf-engine=xelatex # --include-in-header=preamble.tex

Use this header to make the doc beautiful:

header-includes:
    - \usepackage{ragged2e}
    - \usepackage{fancyhdr}
    - \usepackage{geometry}
    - \usepackage{xcolor}
    - \geometry{letterpaper, top=1in, bottom=1in, left=2in, right=2in}
    - \pagestyle{fancy}
    - \setlength{\headwidth}{\textwidth}