GitSite has an excellent feature that can export the whole book to a single PDF file.
To create PDF you must run the site on your local computer:
$ gitsite-cli serve
To create a PDF based on a book, for example, gitsite-guide
, just open the url http://localhost:3000/books/gitsite-guide/pdf in browser and PDF is generated on-the-fly.
You can download the generated PDF.
GitSite uses Puppeteer and pdf-lib to generate PDF from HTML. In general, there are 3 HTML pages which generated by gitsite-cli:
/books/gitsite-guide/pdf.html
;/books/gitsite-guide/pdf.front.html
;/books/gitsite-guide/pdf.back.html
.The URLs listed above are only available on local development mode. You can check the pages to preview PDF content.
Header and footer on every page can also be customized. Header and footer are defined in the following templates:
pdf_header.html
;pdf_footer.html
.