# MkDocs Exporter
<div>
<a href="https://pypi.org/project/mkdocs-exporter">
<img src="https://img.shields.io/pypi/v/mkdocs-exporter?color=blue">
</a>
<a href="https://pypi.org/project/mkdocs-exporter">
<img src="https://img.shields.io/pypi/pyversions/mkdocs-exporter?color=blue">
</a>
<a href="https://pypi.org/project/mkdocs-exporter">
<img src="https://img.shields.io/pypi/dm/mkdocs-exporter?color=blue">
</a>
<a href="https://github.com/adrienbrignon/mkdocs-exporter/blob/master/LICENSE">
<img align="right" src="https://img.shields.io/github/license/adrienbrignon/mkdocs-exporter?color=white">
</a>
</div>
<a href="https://adrienbrignon.github.io/mkdocs-exporter/getting-started/">
<img src="https://github.com/adrienbrignon/mkdocs-exporter/assets/10183277/85c768f6-fe27-43a1-998c-ac89e926cba1" align="right" width="350">
</a>
<br />
A highly-configurable plugin for [*MkDocs*](https://github.com/mkdocs/mkdocs) that exports your pages to PDF files.
- [Documentation](https://adrienbrignon.github.io/mkdocs-exporter)
- [PyPI](https://pypi.org/project/mkdocs-exporter)
- [Examples](./examples)
## Features
- 🚀 **Fast** - PDF documents are generated concurrently!
- 🎨 **Customizable** - full control over the resulting documents
- [Cover pages](https://adrienbrignon.github.io/mkdocs-exporter/setup/setting-up-documents/#setting-up-cover-pages) (supports [`macros`](https://github.com/fralau/mkdocs_macros_plugin) plugin)
- Define custom scripts and stylesheets to customize your PDF documents
- [Define "buttons"](https://adrienbrignon.github.io/mkdocs-exporter/setup/setting-up-buttons/) at the top of your documentation pages ([example](https://adrienbrignon.github.io/mkdocs-exporter/setup/setting-up-buttons/))
- Compatible with [`material`](https://github.com/squidfunk/mkdocs-material) and [`readthedocs`](https://www.mkdocs.org/user-guide/choosing-your-theme/#readthedocs) themes
- Check out some sample PDF documents [here](./examples/themes)
- ⭐ **Powerful** - it uses a headless browser and some awesome libraries under the hood to generate PDF files
- [*Playwright*](https://github.com/microsoft/playwright-python) to automate browsers
- [*Paged.js*](https://github.com/pagedjs/pagedjs) polyfills are included ([Paged Media](https://www.w3.org/TR/css-page-3/) and [Generated Content](https://www.w3.org/TR/css-gcpm-3/) CSS modules)
- [*Sass*](https://sass-lang.com/) support (via [`libsass`](https://github.com/sass/libsass-python)) for your stylesheets
## Prerequisites
- Python `>= 3.8`
- MkDocs `>= 1.4`
## Installation
The plugin is hosted on [*PyPI*](https://pypi.org/project/mkdocs-exporter/) and can be installed via `pip` (or your favourite package manager):
```bash
pip install mkdocs-exporter
```
## Usage
Three plugins are currently available:
- `exporter` (*required*): base plugin which must precede the others
- `exporter-pdf` (*optional*): plugin that exports your pages as individual PDF documents
- `exporter-extras` (*optional*): provides extra functionalities (buttons, HTML utilities...)
### Example
The following configuration excerpt from [`mkdocs.yml`](./mkdocs.yml) should cover the basic functionalities of this plugin:
```yaml
plugins:
- exporter
- exporter-pdf:
concurrency: 8
covers:
front: resources/templates/covers/front.html.j2
back: resources/templates/covers/back.html.j2
stylesheets:
- resources/stylesheets/pdf.scss
- exporter-extras:
buttons:
- title: Download as PDF
enabled: !!python/name:mkdocs_exporter.plugins.pdf.button.enabled
icon: !!python/name:mkdocs_exporter.plugins.pdf.button.icon
attributes:
href: !!python/name:mkdocs_exporter.plugins.pdf.button.href
download: !!python/name:mkdocs_exporter.plugins.pdf.button.download
```
Check out a [sample PDF generated by this plugin](examples/example.pdf) from the default page of the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material) theme.
It has been built with some custom CSS and features cover pages.
## Roadmap
- Combine all pages as one PDF
Feel free to request additional features by submitting an issue or by contributing through a pull request.
## License
This project is licensed under the `MIT License (MIT)`, which you can read [here](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/adrienbrignon/mkdocs-exporter",
"name": "mkdocs-exporter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "mkdocs, pdf, exporter",
"author": "Adrien Brignon",
"author_email": "adrien@brignon.dev",
"download_url": "https://files.pythonhosted.org/packages/b0/6f/1f62c00ed26fcd268ca2874285f0af4b9928cfbbc01fb028f13d95789708/mkdocs_exporter-5.3.1.tar.gz",
"platform": null,
"description": "# MkDocs Exporter\n\n<div>\n <a href=\"https://pypi.org/project/mkdocs-exporter\">\n <img src=\"https://img.shields.io/pypi/v/mkdocs-exporter?color=blue\">\n </a>\n <a href=\"https://pypi.org/project/mkdocs-exporter\">\n <img src=\"https://img.shields.io/pypi/pyversions/mkdocs-exporter?color=blue\">\n </a>\n <a href=\"https://pypi.org/project/mkdocs-exporter\">\n <img src=\"https://img.shields.io/pypi/dm/mkdocs-exporter?color=blue\">\n </a>\n <a href=\"https://github.com/adrienbrignon/mkdocs-exporter/blob/master/LICENSE\">\n <img align=\"right\" src=\"https://img.shields.io/github/license/adrienbrignon/mkdocs-exporter?color=white\">\n </a>\n</div>\n<a href=\"https://adrienbrignon.github.io/mkdocs-exporter/getting-started/\">\n <img src=\"https://github.com/adrienbrignon/mkdocs-exporter/assets/10183277/85c768f6-fe27-43a1-998c-ac89e926cba1\" align=\"right\" width=\"350\">\n</a>\n<br />\n\nA highly-configurable plugin for [*MkDocs*](https://github.com/mkdocs/mkdocs) that exports your pages to PDF files.\n\n- [Documentation](https://adrienbrignon.github.io/mkdocs-exporter)\n- [PyPI](https://pypi.org/project/mkdocs-exporter)\n- [Examples](./examples)\n\n## Features\n\n- \ud83d\ude80 **Fast** - PDF documents are generated concurrently!\n- \ud83c\udfa8 **Customizable** - full control over the resulting documents\n - [Cover pages](https://adrienbrignon.github.io/mkdocs-exporter/setup/setting-up-documents/#setting-up-cover-pages) (supports [`macros`](https://github.com/fralau/mkdocs_macros_plugin) plugin)\n - Define custom scripts and stylesheets to customize your PDF documents\n - [Define \"buttons\"](https://adrienbrignon.github.io/mkdocs-exporter/setup/setting-up-buttons/) at the top of your documentation pages ([example](https://adrienbrignon.github.io/mkdocs-exporter/setup/setting-up-buttons/))\n - Compatible with [`material`](https://github.com/squidfunk/mkdocs-material) and [`readthedocs`](https://www.mkdocs.org/user-guide/choosing-your-theme/#readthedocs) themes\n - Check out some sample PDF documents [here](./examples/themes)\n- \u2b50 **Powerful** - it uses a headless browser and some awesome libraries under the hood to generate PDF files\n - [*Playwright*](https://github.com/microsoft/playwright-python) to automate browsers\n - [*Paged.js*](https://github.com/pagedjs/pagedjs) polyfills are included ([Paged Media](https://www.w3.org/TR/css-page-3/) and [Generated Content](https://www.w3.org/TR/css-gcpm-3/) CSS modules)\n - [*Sass*](https://sass-lang.com/) support (via [`libsass`](https://github.com/sass/libsass-python)) for your stylesheets\n\n## Prerequisites\n\n- Python `>= 3.8`\n- MkDocs `>= 1.4`\n\n## Installation\n\nThe plugin is hosted on [*PyPI*](https://pypi.org/project/mkdocs-exporter/) and can be installed via `pip` (or your favourite package manager):\n\n```bash\npip install mkdocs-exporter\n```\n\n## Usage\n\nThree plugins are currently available:\n\n- `exporter` (*required*): base plugin which must precede the others\n- `exporter-pdf` (*optional*): plugin that exports your pages as individual PDF documents\n- `exporter-extras` (*optional*): provides extra functionalities (buttons, HTML utilities...)\n\n### Example\n\nThe following configuration excerpt from [`mkdocs.yml`](./mkdocs.yml) should cover the basic functionalities of this plugin:\n\n```yaml\nplugins:\n - exporter\n - exporter-pdf:\n concurrency: 8\n covers:\n front: resources/templates/covers/front.html.j2\n back: resources/templates/covers/back.html.j2\n stylesheets:\n - resources/stylesheets/pdf.scss\n - exporter-extras:\n buttons:\n - title: Download as PDF\n enabled: !!python/name:mkdocs_exporter.plugins.pdf.button.enabled\n icon: !!python/name:mkdocs_exporter.plugins.pdf.button.icon\n attributes:\n href: !!python/name:mkdocs_exporter.plugins.pdf.button.href\n download: !!python/name:mkdocs_exporter.plugins.pdf.button.download\n```\n\nCheck out a [sample PDF generated by this plugin](examples/example.pdf) from the default page of the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material) theme. \nIt has been built with some custom CSS and features cover pages.\n\n## Roadmap\n\n- Combine all pages as one PDF\n\nFeel free to request additional features by submitting an issue or by contributing through a pull request.\n\n## License\n\nThis project is licensed under the `MIT License (MIT)`, which you can read [here](LICENSE).\n",
"bugtrack_url": null,
"license": null,
"summary": "A highly-configurable plugin for MkDocs that exports your pages to PDF files.",
"version": "5.3.1",
"project_urls": {
"Bug Tracker": "https://github.com/adrienbrignon/mkdocs-exporter/issues",
"Homepage": "https://github.com/adrienbrignon/mkdocs-exporter",
"Repository": "https://github.com/adrienbrignon/mkdocs-exporter"
},
"split_keywords": [
"mkdocs",
" pdf",
" exporter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d96c5392043fb881b258ed6ed70e457d2558f4fbd5193e2c9ecf9fcad3b5bd25",
"md5": "a4959d0525cc3aa5183b877b659be13b",
"sha256": "da2d36bde6a25164bc948b563a3da08e3b92cfdef85f612150a96e932f764fd8"
},
"downloads": -1,
"filename": "mkdocs_exporter-5.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a4959d0525cc3aa5183b877b659be13b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 118310,
"upload_time": "2024-03-24T08:04:04",
"upload_time_iso_8601": "2024-03-24T08:04:04.468722Z",
"url": "https://files.pythonhosted.org/packages/d9/6c/5392043fb881b258ed6ed70e457d2558f4fbd5193e2c9ecf9fcad3b5bd25/mkdocs_exporter-5.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b06f1f62c00ed26fcd268ca2874285f0af4b9928cfbbc01fb028f13d95789708",
"md5": "5b9e842f756d90b18eb73c9de8c4797b",
"sha256": "d54d4ef3cd8030de58e24b198820cf70cbbcd9d3e9dd573a64706bdcf1d5ee6d"
},
"downloads": -1,
"filename": "mkdocs_exporter-5.3.1.tar.gz",
"has_sig": false,
"md5_digest": "5b9e842f756d90b18eb73c9de8c4797b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 111368,
"upload_time": "2024-03-24T08:04:06",
"upload_time_iso_8601": "2024-03-24T08:04:06.775564Z",
"url": "https://files.pythonhosted.org/packages/b0/6f/1f62c00ed26fcd268ca2874285f0af4b9928cfbbc01fb028f13d95789708/mkdocs_exporter-5.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-24 08:04:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adrienbrignon",
"github_project": "mkdocs-exporter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "mkdocs-exporter"
}