Skip to content

Instantly share code, notes, and snippets.

@bencevans
Created November 5, 2018 17:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bencevans/e7a0f962c12b3a4f94df5cb38d5a52af to your computer and use it in GitHub Desktop.
Save bencevans/e7a0f962c12b3a4f94df5cb38d5a52af to your computer and use it in GitHub Desktop.
GitHub Style Markdown -> PDF with Pandoc + Weasyprint
build:
pandoc writing.md --standalone \
--bibliography writing.bib --csl writing.csl \
-c https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.10.0/github-markdown.css \
-t html \
| sed '/<body>/c\<body class="markdown-body">' \
| weasyprint - output.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment