Individual documentation pages print well from most browsers as the layouts have been styled to omit navigational chrome from the printed output.
On some sites, it can be useful to enable a “print entire section” feature (as seen in this user guide). Selecting this option renders the entire current top-level section (such as Content and Customization for this page) with all of its child pages and sections in a format suited to printing, complete with a table of contents for the section.
To enable this feature, add the “print” output format in your site’s
config.toml file for the “section” type:
[outputs] section = [ "HTML", "RSS", "print" ]
The site should then show a “Print entire section” link in the right hand navigation.
Disabling the ToC
To disable showing the the table of contents in the printable view, set the
disable_toc param to
true, either in the page front matter, or in
[params.print] disable_toc = true
A number of layout partials and hooks are defined that can be used to customize the printed format. These can be found in
Hooks can be defined on a per-type basis. For example, you may want to customize the layouts of heading for “blog” pages vs “docs”. This can be achieved by creating
layouts/partials/print/page-heading-<type>.html - eg.
page-heading-blog.html. It defaults to using the page title and description as a heading.
Similarly, the formatting for each page can be customized by creating
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.