Repository navigation
Immutable
release. Only release title and notes can be modified.
7.0.0 (2026-11-17)
Read the migration guide when upgrading from v6.
Added
- Books (
formats.pdf.books): pages combined into single documents, with bookmarks following the navigation and the pages' headings (outline), links between pages pointing within the book (#52), and a table of contents with page numbers (toc) (#46). - Several books, selecting pages with patterns (
include,exclude) (#31), whose pages can start on right-hand pages (start: odd) (#67). - Documents of pages can start with a table of contents of their headings (
formats.pdf.toc) (#24). - Headers and footers with placeholders (
header,footer:{page},{pages},{page_title},{section}...) (#84). - Cover pages are Jinja templates, with or without the macros plugin (#50).
- Documents and books are tagged for screen readers, with bookmarks and their language (
taggeddisables it for a book). - Per-page options under the
exporterkey of the front matter (exporter.pdf.enabled,exporter.pdf.covers,exporter.pdf.toc.enabled,exporter.buttons), validated, with defaults for a directory in.meta.ymlfiles (Material'smetaplugin). mkdocs-exporter buildexports websites built by Zensical, once they are built (experimental).- A ready-made button downloading the book a page is part of (
mkdocs_exporter.formats.pdf.buttons.book). - Unchanged documents are reused from a cache (
formats.pdf.cache). formats.pdf.serveto generate documents while serving (the browser is kept open between rebuilds).formats.pdf.browser.channelandformats.pdf.browser.delayoptions (#81).mkdocs-exporter-ignoreandmkdocs-exporter-onlyclasses, for content of the website or of documents only (#33).page-break,page-break-beforeandavoid-page-breakclasses (#63).MkDocsExporter.beforeandMkDocsExporter.afterhooks.- Support for ProperDocs, for Python 3.15, and for themes without dedicated support (#68).
- Distributions are published with their build provenance (PEP 740 attestations on PyPI).
Changed
- Documents are printed by Chromium itself instead of the Paged.js polyfill: about 2.4 times faster, with better CSS support (nesting,
@pagerules in media queries, different page sizes). Paged.js can still be loaded withformats.pdf.scripts. - Requires Python 3.11.5+, MkDocs 1.6+ (#72) and Playwright 1.53+ (Chromium 138).
- Books are printed as a single document instead of rendering every page again and merging the documents: about 3 times faster on a 200-page website, with page counters continuous in custom stylesheets, identifiers of different pages kept apart (footnotes, tabs) and bookmarks pointing exactly at their headings.
- Documents are rendered twice as many at a time as there are CPUs, up to 8, by default (
formats.pdf.concurrency, 4 before). - Pages are served to the browser by a local HTTP server: absolute paths,
srcset, CSSurl()and fetches resolve like on the website (#58, #62, #65). - Pagination failures are reported immediately with the JavaScript error instead of timing out (#59, #79), and a failing page no longer prevents the others from being rendered; a missing browser is reported with the command installing it.
- Documents are not generated by
mkdocs serveby default (#78). - Cover pages are no longer part of the website, nor processed as Markdown; the back cover comes after footnotes (#17).
formats.pdf.urlreplaces the root of the website in links.- The theme's scripts run in documents (e.g. Material's diagrams are rendered like on the website).
- The plugin no longer replaces the global asyncio event loop (#45, #47, #49).
Fixed
- Download buttons link to the right document with
use_directory_urls: false(#44, #60, #73). - Page numbers of books account for the actual size of removed covers (#66).
- Backgrounds of pages set by
@pagerules (e.g. a full-bleed cover's) are no longer hidden by the website's background. - Wide content and pages of different sizes no longer shrink every page of a document; content printed on pages of another size (e.g. landscape pages for wide tables) is laid out with their width.
- Pages listed twice in the navigation, or skipped by dirty rebuilds, no longer break books (#48, #51).
- Stylesheets excluded from the build are no longer rewritten (#85).
mailto:and other non-HTTP links are preserved.- The
metadataof books is honored. - Scripts are injected even when no stylesheet is configured.
- The back cover is no longer broken when a page doesn't end with a blank line (#82).
Deprecated
formats.pdf.aggregator, replaced byformats.pdf.books(a list of books).- The top-level front matter keys
pdf,covers,hide: [covers],toc,buttonsandpdf-icon, replaced by theexporterkey (they still work, with a warning, which fails builds run with--strict). data-teleport, replaced bydata-mkdocs-exporter-teleport, anddata-decompose="true", replaced by themkdocs-exporter-onlyclass.mkdocs_exporter.formats.pdf.buttons.download.icon, which readpdf-icon.
Removed
- The bundled Paged.js (see the migration guide).
- Sass support: stylesheets must be plain CSS.
- The internal modules of v6 (see the migration guide).