Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To convert Jekyll documentation to PDF with a clickable table of contents, first build the site as HTML, then pass the generated HTML to a PDF engine such as Prince or wkhtmltopdf. Jekyll converts Markdown pages with front matter into HTML; the PDF engine consumes that built site, not your Markdown source directly. For a page-level TOC, kramdown can generate a heading list; for a whole manual, a Prince workflow can build a TOC from the documentation sidebar.

Choose how the table of contents should work

There are two different TOCs to consider. A page-level TOC is a list of headings within one HTML page. A manual-level TOC gathers documentation pages into a book-like PDF, typically using the site’s sidebar or an explicit page list. Decide which you need before choosing the build configuration: a generated heading list on one page does not automatically assemble an entire documentation site.

For a TOC within a page

With kramdown, put * TOC followed by {:toc} where the heading list should appear. The page must also have the TOC front-matter setting required by the project or theme. The marker alone may not be enough; if it renders as literal text or an empty list, check the front matter and heading structure.

For a whole manual

Use the documentation theme’s PDF workflow, if it has one, or configure the PDF build to include the desired pages and their sidebar order. The documented Prince workflow uses page metadata and sidebar entries to determine inclusion and create a full TOC plus mini-TOCs on section pages. Its Jekyll How-to Guide describes output with page numbers in cross-references and running headers and footers as well. Treat those as capabilities of that documented workflow, not guaranteed features of every Jekyll theme or PDF converter.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prepare a PDF-specific Jekyll build

Keep the source Markdown, YAML front matter, permalinks, sidebar URLs and assets in agreement. Jekyll normally reflects the source folder structure in _site, unless permalinks change the output paths. The PDF process depends on the generated paths being resolvable, so a sidebar link that works in the web site but points to a missing or differently named output file can disrupt a strict conversion workflow.

  1. Make a separate configuration file, for example _config_pdf.yml, rather than changing the configuration used for the normal site.

  2. In that PDF configuration, set the print title and subtitle, identify the sidebar, select the site folder, and mark which pages belong in the PDF. The documented Prince approach uses page metadata and sidebar entries for this selection; adapt the fields to the theme’s actual configuration rather than copying settings from a different theme.

  3. Check that the listed page URLs, permalinks and asset paths correspond to files that the build will generate under _site. If the project uses a theme-provided list such as prince-list.txt, verify each entry against the output paths.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Keep Jekyll and gem dependencies reproducible with Bundler. GitHub recommends Bundler to reduce dependency-related build errors and environment bugs.

Jekyll is a static site generator built into GitHub Pages, but a local PDF workflow still depends on the project’s theme, configuration and installed gems. A PDF-specific configuration makes the output choices easier to review without changing the ordinary web build.

Build the HTML before converting it

Run the PDF configuration through the project’s Jekyll build or serve command. The documented workflow uses:

jekyll serve --config _config_pdf.yml

Use the equivalent command and configuration conventions for the project if it wraps Jekyll in Bundler or another build script. Inspect the generated HTML and _site paths before invoking the converter. A documentation theme’s Prince example specifically requires building an HTML web target even though the final deliverable is a PDF.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Convert the built HTML to PDF

Choose the engine based on the output you need and the integration the project already supports. Prince has the most complete cited documentation-theme workflow here, including manual TOCs and print-oriented page features. wkhtmltopdf offers command-line controls for outlines, TOC-related behavior, page offsets and print-media selection. A plugin such as jekyll-pdf can reduce custom glue by generating PDFs from pages or collections when pdf: true is set in front matter or defaults, and accepts wkhtmltopdf-compatible settings. Check a plugin’s current maintenance and compatibility before adding it; the available evidence does not establish its present maintenance status.

Prince

Use the theme’s documented Prince command and input list where available. The converter needs the built HTML and must be able to resolve the pages and assets it references. The theme’s page metadata and sidebar conventions govern which content enters the PDF, so follow those conventions rather than assuming a generic command will infer the manual structure.

wkhtmltopdf

Point wkhtmltopdf at the generated HTML entry page or the HTML input appropriate to your project. Its controls include outline/TOC behavior, page offsets and print-media selection. Verify the command’s options against your installed version and desired layout; the specific command line depends on whether you are converting one page or assembling multiple pages, and no single universal command for Jekyll manuals is established by the available documentation.

jekyll-pdf

For page- or collection-level PDF generation, enable the documented pdf: true front-matter flag or configure it through defaults, then use the plugin’s wkhtmltopdf-compatible options. This is a convenient integration path, but it adds a gem dependency and does not remove the need to test page inclusion, TOC behavior and print styling in the resulting PDF.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Style and inspect the PDF

Web navigation, sidebars and interactive controls usually do not belong in a printed manual. Use a PDF layout or print stylesheet to hide web-only elements and apply print-specific formatting. The cited documentation theme uses a print layout that removes navigation and sidebars while retaining print formatting.

Review the actual PDF rather than relying only on a successful process exit. Check the TOC links, page order, page breaks, headings, cross-references, running headers or footers if configured, and every image. If the PDF engine has print-media controls, make sure the intended print CSS is active. Local and absolute asset paths need to be accessible to the converter; a browser-only path or missing file in _site may not work in the PDF process.

Troubleshooting common failures

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For a screenshot or PDF of a single accessible web page—not for assembling a multi-page Jekyll manual with its own TOC—ScreenshotNeo can capture a URL with one request. Its clean-shot workflow accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and responses identify page verdict and billing status in headers. It also has an MCP server for AI agents. Plans include 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 shots.

See the ScreenshotNeo API documentation. This cURL example captures the Jekyll documentation homepage as an image:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://jekyllrb.com/docs/ -o shot.webp

That call is for a page capture, not a replacement for building and converting a complete manual with a clickable TOC. Sign up for ScreenshotNeo to get 1,000 screenshots a month free with no card.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently asked questions

Can I convert Jekyll Markdown straight to PDF?

This workflow builds the Jekyll site as HTML first, then converts the generated HTML. The HTML build resolves Jekyll content and paths before the PDF engine lays out the document.

Will a TOC link to PDF pages?

A heading TOC can link within its generated page, while a manual-level TOC depends on the PDF workflow and converter. Inspect the finished file’s links and navigation; do not assume that an HTML TOC automatically becomes a PDF outline or page-numbered contents list.

Which engine should I use?

For a theme whose documented workflow relies on advanced manual structure and print features, start with its Prince instructions. Consider wkhtmltopdf when its command-line controls or plugin compatibility fit the project, and weigh a plugin’s added dependency against the custom integration it saves.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.