Skip to content

๐Ÿ“ MkDocs Exporter is a powerful plugin for MkDocs that enables seamless conversion of single pages and/or the entire documentation into professional PDF files.

License

Notifications You must be signed in to change notification settings

dev-artisan/mkdocs-exporter

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MkDocs Exporter


A highly configurable plugin for MkDocs that exports your pages as PDF documents.
Additionally, it can combine your entire documentation into a single PDF file.

Features

  • ๐Ÿš€ Fast - All PDF documents are generated concurrently!
  • ๐ŸŽจ Customizable - full control over the resulting documents
    • Combine all your pages into a single PDF document
    • Create cover pages
    • Define custom scripts and stylesheets to customize your PDF documents
    • Add buttons to the top of your pages (example)
    • Compatible with material and readthedocs themes
      • Check out sample PDF documents here
  • โญ Powerful - it uses a headless browser and some awesome libraries under the hood to generate PDF documents

Prerequisites

  • Python >= 3.9
  • MkDocs >= 1.4

Installation

The plugin is hosted on PyPI and can be installed via pip (or your favourite package manager):

pip install mkdocs-exporter

Usage

The following configuration excerpt from the mkdocs.yml configuration file used by this documentation should cover the basic functionalities of this plugin:

plugins:
  - exporter:
      formats:
        pdf:
          enabled: !ENV [MKDOCS_EXPORTER_PDF, true]
          concurrency: 8
          stylesheets:
            - resources/stylesheets/pdf.scss
          covers:
            front: resources/templates/covers/front.html.j2
            back: resources/templates/covers/back.html.j2
          aggregator:
            enabled: true
            output: .well-known/site.pdf
            covers: all

Check out a sample PDF generated by this plugin, it includes custom CSS and features cover pages.

Roadmap

  • Combine all pages into a single PDF document (โœ… released in v6.0.0)
  • Create a GitHub action that includes all dependencies to build the documentation and generate PDF documents

Feel free to request additional features by submitting an issue or contributing through a pull request.

Contributing

We welcome contributions from the community to enhance MkDocs Exporter.
Whether you want to report a bug, suggest a feature, improve the documentation, or contribute code, your help is appreciated!

License

This project is licensed under the MIT License (MIT), which you can read here.

About

๐Ÿ“ MkDocs Exporter is a powerful plugin for MkDocs that enables seamless conversion of single pages and/or the entire documentation into professional PDF files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.4%
  • Jinja 6.4%
  • JavaScript 2.9%
  • SCSS 2.7%
  • Dockerfile 2.1%
  • Makefile 1.6%
  • Other 0.9%