DocFlux MkDocs plugin for DOCX and PDF export
Project description
DocFlux MkDocs
DocFlux MkDocs is a MkDocs plugin that exports documentation to DOCX and PDF with one configuration surface.
Status: early MVP scaffold. The current implementation focuses on a reliable single-file export path with:
- Pandoc DOCX export.
- Pandoc HTML + headless Chrome PDF export.
- Optional Mermaid pre-render (
mmdc) into PNG for DOCX/PDF compatibility.
Goals
- Provide first-class DOCX export for MkDocs projects.
- Provide a pragmatic PDF export path in the same plugin.
- Keep configuration simple and reproducible in CI.
License
This project is licensed under Apache-2.0. See LICENSE.
Installation (development)
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
Pandoc is required at runtime for the MVP exporter.
MkDocs configuration
plugins:
- search
- docflux-mkdocs:
formats: [docx, pdf]
output_dir: exports
filename: project-docs
single_file: true
command_timeout_seconds: 300
pandoc_path: pandoc
toc: true
toc_depth: 3
docx_reference_doc: templates/reference.docx
docx_extra_args: []
pdf_strategy: chrome
pdf_engine: xelatex
pdf_css: scripts/pdf-style.css
chrome_path: google-chrome
chrome_extra_args: []
mermaid_mode: pre_render
mermaid_renderer: mmdc
mmdc_path: mmdc
mermaid_kroki_url: https://kroki.io
mermaid_background: white
mermaid_width: 1600
mermaid_timeout_seconds: 45
mermaid_fail_on_error: false
mermaid_chrome_path: /usr/bin/google-chrome
mermaid_extra_args: []
pandoc_extra_args: []
pdf_extra_args: []
Legacy alias: mkdocs-export is still available for backward compatibility.
Notes on PDF strategies
pdf_strategy: chromeis recommended when no LaTeX engine is installed.pdf_strategy: pandocuses Pandoc PDF conversion directly and usually requires a LaTeX engine (xelatex,pdflatex, etc.).
Notes on Mermaid
mermaid_mode: pre_renderreplaces fenced Mermaid blocks with PNG images before export.mermaid_renderer: mmdcuses Mermaid CLI (local tool, may require Chromium).mermaid_renderer: krokirenders Mermaid diagrams through a Kroki server and avoids local Chrome/Chromium.- If Mermaid rendering fails and
mermaid_fail_on_error: false, the plugin keeps the original Mermaid code block and continues.
Development
pytest
Planning docs
- Product spec:
docs/spec/product-spec.md - Architecture:
docs/spec/architecture.md - Roadmap:
docs/spec/roadmap.md - Open questions:
docs/spec/open-questions.md - Fixture report:
docs/spec/fixture-report-2026-02-16.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docflux_mkdocs-0.1.0.tar.gz.
File metadata
- Download URL: docflux_mkdocs-0.1.0.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94d6de894b3db97ae75f04a7beac45c3de2f13ad8c38a463549de4fed924de8f
|
|
| MD5 |
7076185cd0acbdabf248d12bf326e1bd
|
|
| BLAKE2b-256 |
350d5954b9d99e03362e7e75246ff137c44420ed42a0111d77c3161dd7c4fa54
|
File details
Details for the file docflux_mkdocs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: docflux_mkdocs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0348025541d0ae34ca796eebc8925758aa7c01b09d66fd361cf2327d5f5cfad5
|
|
| MD5 |
34aa9ec377ffaa38687617c062db02e7
|
|
| BLAKE2b-256 |
27f5d7ac8f461b8ed93c832ccbebba644bb83184dd83e258c596d9222a08ac8e
|