Skip to content

v7.0.0

Latest

Choose a tag to compare

@mkdocs-exporter mkdocs-exporter released this 17 Nov 23:31
Immutable release. Only release title and notes can be modified.
66a1d59

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 (tagged disables it for a book).
  • Per-page options under the exporter key of the front matter (exporter.pdf.enabled, exporter.pdf.covers, exporter.pdf.toc.enabled, exporter.buttons), validated, with defaults for a directory in .meta.yml files (Material's meta plugin).
  • mkdocs-exporter build exports 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.serve to generate documents while serving (the browser is kept open between rebuilds).
  • formats.pdf.browser.channel and formats.pdf.browser.delay options (#81).
  • mkdocs-exporter-ignore and mkdocs-exporter-only classes, for content of the website or of documents only (#33).
  • page-break, page-break-before and avoid-page-break classes (#63).
  • MkDocsExporter.before and MkDocsExporter.after hooks.
  • 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, @page rules in media queries, different page sizes). Paged.js can still be loaded with formats.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, CSS url() 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 serve by default (#78).
  • Cover pages are no longer part of the website, nor processed as Markdown; the back cover comes after footnotes (#17).
  • formats.pdf.url replaces 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 @page rules (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 metadata of 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 by formats.pdf.books (a list of books).
  • The top-level front matter keys pdf, covers, hide: [covers], toc, buttons and pdf-icon, replaced by the exporter key (they still work, with a warning, which fails builds run with --strict).
  • data-teleport, replaced by data-mkdocs-exporter-teleport, and data-decompose="true", replaced by the mkdocs-exporter-only class.
  • mkdocs_exporter.formats.pdf.buttons.download.icon, which read pdf-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).