0

I created a Jekyll page hosted on GitHub. This page is nothing but a step-by-step guide. I'd like to have all the content (i.e. all the markdown files/the content from within the pages folder) automatically generated as pdf with a TOC. Yes, there are already some questions on that on the board (e.g. here) but none of them (nor my internet research) provides a tutorial-like guidance on how to really implement it end to end and generate the pdf. Can someone give guidance (preferably with a free to use library, so not e.g. Prince).

jennab
  • 125
  • 11
  • `wkhtmltopdf` might suit your needs... – mb21 Mar 28 '19 at 14:42
  • @mb21: That's exactly the thing. Certainly, I stumbled over wkhtmltopdf but I'm missing a tutorial on how to implement it end to end and how to print out the complete content of the pages folder in my jekyll project. what gems do i need, what commands do I need to run. For experienced people, it might be a piece of cake... anything available? – jennab Mar 29 '19 at 08:43

1 Answers1

2

Simply host your website on GitHub Pages or Netlify or even localhost, then use wkhtmltopdf to convert a page to a PDF, like:

wkhtmltopdf https://username.github.io output.pdf

For detailed usage see man wkhtmltopdf.

mb21
  • 34,845
  • 8
  • 116
  • 142