/pandoc-markdown

使用 pandoc 将 markdown 转换为其他格式,比如 html、pdf 等。

Primary LanguageCSS

pandoc-markdown

dependence

  • pandoc
  • wkhtmltopdf
  • etc.

to html

# to html
pandoc -s ./markdown/resume.md -o ./output/resume.html

# with css file
pandoc -s ./markdown/resume.md -o ./output/resume.html -c ../css/resume.css

# If you want css file contained into html file you can use --self-contained
pandoc -s ./markdown/resume.md -o ./output/resume.html -c ./css/resume.css --self-contained

# html to pdf
wkhtmltopdf ./output/resume.html ./output/resume.pdf

to pdf

# 手动指定 --pdf-engine 为 wkhtmltopdf
pandoc ./markdown/resume.md -o ./output/resume.pdf --css ../css/resume.css --pdf-engine wkhtmltopdf

# 使用 -t html5 默认 --pdf-engine 为 wkhtmltopdf
pandoc ./markdown/resume.md -o ./output/resume.pdf --css ../css/resume.css -t html5