Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 6 #22

Merged
merged 13 commits into from
Jun 7, 2024
Merged

Version 6 #22

merged 13 commits into from
Jun 7, 2024

Conversation

adrienbrignon
Copy link
Owner

@adrienbrignon adrienbrignon commented May 31, 2024

MkDocs Exporter is now a single plugin (there is no longer the need to register exporter-pdf, exporter-extras...), see for yourself:

- exporter:
formats:
pdf:
concurrency: 16
enabled: !ENV [MKDOCS_EXPORTER_PDF, true]
stylesheets:
- resources/stylesheets/pdf.scss
covers:
front: resources/templates/covers/front.html.j2
back: resources/templates/covers/back.html.j2
browser:
debug: false
headless: true
aggregator:
enabled: true
output: .well-known/document.pdf
covers: all
buttons:
- title: View as PDF
icon: material-file-move-outline
enabled: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.enabled
attributes:
target: _blank
href: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.href
- title: Download as PDF
icon: material-file-download-outline
enabled: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.enabled
attributes: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.attributes

  • 📃 Introduced the aggregator feature, it can be used to combine PDF documents as a single one (fixes #)
    • The behavior of the aggregator with cover pages can be configured
      • all (default): will include all cover pages
      • none: will exclude all cover pages
      • limits: will include only the front cover of the first page and the back cover of the last page
  • 🐛 Miscellaneous fixes and enhancements
  • 🐍 Dropped Python 3.8 support

This new plugin merges PDF documents generated from pages as a single "aggregated" PDF document.
@adrienbrignon adrienbrignon added the enhancement New feature or request label May 31, 2024
@adrienbrignon adrienbrignon self-assigned this May 31, 2024
@adrienbrignon adrienbrignon changed the title feat: aggregator Aggregator plugin May 31, 2024
- The path of the aggregate PDF document is now configurable
- Covers behaviour is now configurable
  - 'none' to omit them
  - 'limits' to include only the first and last one
  - 'all' to include them all
- No longer writing the aggregated PDF document if it does not contain any pages
- Plugins are now called "formats". From now, only the 'exporter' plugin needs to be registered.
  - Formats are still based on plugins, but are loaded dynamically by the 'exporter' one.
@adrienbrignon adrienbrignon changed the title Aggregator plugin Version 6 Jun 2, 2024
@adrienbrignon
Copy link
Owner Author

I am still working on a workaround to ensure page numbers are coherent across files.

- Fixed page numbers not being coherent
- Improved concurrency and performance
@adrienbrignon
Copy link
Owner Author

adrienbrignon commented Jun 7, 2024

I am still working on a workaround to ensure page numbers are coherent across files.

✅ Done!

I am still polishing some rough edges.
Anyway, here's a preview of a file generated by the aggregator: MkDocs Exporter.pdf

@adrienbrignon adrienbrignon merged commit d926dc6 into master Jun 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant