Add generator for documentation as PDF file #252
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #174
Feature
This adds a new
grunt
powered PDF generator that builds documentation to a newdocs/docs.pdf
file.Background
This is based on the node-html-pdf project that can transform html to pdf. It uses a headless browser to drive this and the PDF layout is somewhat limited and finicky. However, it works reliably.
Solution
This introduces a new
/docs.pdf.html
template file that uses Jekyll relative include trickery to build a single html document that contains all of the docs found in the_config.yaml
file. This file can then be processed into a PDF with the new grunt plugin.This requires us to first build the
_site
and then build a PDF file that can be added.Screenshot
Next Steps
The CSS in this is not complete. Because of the limitations of the web font used on the Slim website, the generator is not allowed to use the official font. In addition, there are certainly other improvements that can be made. I consider this to be a PR with demonstration of the mechanics of how this can be done with the existing build tools.
Other Updates
.DS_Store
file.gitignore
file for OSX, PHPStorm, Jekyll, and Node_config.yml
excludes so thatREADME
and friends aren't published.