{"id":9951,"library":"mkdocs-print-site-plugin","title":"MkDocs Print Site Plugin","description":"The mkdocs-print-site-plugin is an MkDocs plugin designed to combine all documentation pages into a single, printable HTML page. This allows for easy export to PDF and creates a standalone HTML file, useful for offline viewing or comprehensive sharing. It is actively maintained with frequent updates, currently at version 2.8.","status":"active","version":"2.8","language":"en","source_language":"en","source_url":"https://github.com/timvink/mkdocs-print-site-plugin","tags":["mkdocs","documentation","pdf","html","plugin","export","print"],"install":[{"cmd":"pip install mkdocs-print-site-plugin","lang":"bash","label":"Install plugin"}],"dependencies":[{"reason":"This is an MkDocs plugin and requires MkDocs to be installed to function.","package":"mkdocs","optional":false}],"imports":[],"quickstart":{"code":"site_name: My Docs\n\nplugins:\n  - print-site","lang":"yaml","description":"To enable the print-site plugin, add it to the `plugins` section of your `mkdocs.yml` file. After building your site (`mkdocs build`), a new 'print-site' page will be generated at the root of your site, typically accessible at `/print_page/` or `your-site.com/print_page/`."},"warnings":[{"fix":"Upgrade `mkdocs-print-site-plugin` to v2.3.6 or newer. Ensure your MkDocs version is compatible with the plugin's requirements.","message":"Prior to v2.3.6, the plugin could break with MkDocs 1.5 due to changes in how `extra_javascript` was handled, leading to build failures or incorrect script loading.","severity":"breaking","affected_versions":"<2.3.6"},{"fix":"Upgrade `mkdocs-print-site-plugin` to v2.5.0 or newer, which adds support for pages with missing H1 tags. Alternatively, ensure all pages have at least one H1 heading.","message":"Before version 2.5.0, pages without an H1 heading would cause an error during site generation. This was a common footgun for users with less structured pages.","severity":"gotcha","affected_versions":"<2.5.0"},{"fix":"If encountering issues with other plugins, try adjusting the order of `print-site` in your `mkdocs.yml` `plugins` list. Place `print-site` later in the list if it needs to process output from other plugins.","message":"While often flexible, for some MkDocs hooks or other plugins, the order of `print-site` in the `plugins` list could lead to unexpected behavior or warnings. v2.6.0 addressed invalid warnings, but complex setups might still require careful ordering.","severity":"gotcha","affected_versions":"All versions (general MkDocs plugin behavior)"},{"fix":"Upgrade `mkdocs-print-site-plugin` to v2.7.1 or newer to ensure correct folder exclusion behavior.","message":"Prior to v2.7.1, the `exclude()` function in the plugin configuration might not correctly deal with excluding entire folders, leading to unwanted pages appearing in the print output.","severity":"gotcha","affected_versions":"<2.7.1"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Run `pip install mkdocs-print-site-plugin` to install the package and ensure `print-site` is correctly listed under the `plugins:` section in your `mkdocs.yml`.","cause":"The plugin has not been installed or its name is misspelled in the `mkdocs.yml` configuration.","error":"Plugin 'print-site' is not found"},{"fix":"Ensure `print-site` is an item in a YAML list under `plugins:`, for example:\n```yaml\nplugins:\n  - print-site\n```","cause":"The `print-site` plugin is not configured correctly in `mkdocs.yml`, often due to incorrect YAML indentation or improper list formatting under `plugins:`.","error":"ERROR - Config value 'plugins' must be a list of strings or dicts"},{"fix":"Upgrade `mkdocs-print-site-plugin` to v2.5.0 or newer. Alternatively, ensure all documentation pages have at least one H1 heading.","cause":"A page in your documentation is missing an H1 heading, and you are using a version of the plugin older than v2.5.0 which required all pages to have an H1.","error":"ERROR - The 'print-site' plugin encountered an error: 'NoneType' object has no attribute 'h1'"},{"fix":"Review your `mkdocs.yml` and remove any duplicate entries for `print-site` from the `plugins` list.","cause":"The `print-site` plugin is listed multiple times in the `plugins` section of your `mkdocs.yml` file.","error":"WARNING - Plugin 'print-site' has already been loaded from '<some_path>'. Ignoring new instance from '<another_path>'."}]}