adrienbrignon / mkdocs-exporter

⚡ The fastest and most configurable plugin for MkDocs, allowing seamless export of individual pages or entire documentation as PDF documents.
https://adrienbrignon.github.io/mkdocs-exporter/
MIT License
71 stars 2 forks source link

PDF How to change first and last page config ? #20

Closed boddedo closed 5 months ago

boddedo commented 5 months ago

Hello !

Thank you for your hard work ! it's even better ! :clamp:

I would like to know how to configure the first and last page (the rest of the document is perfect) : image image

There is a config file somewhere ? or something to change the color/design like you have in: https://adrienbrignon.github.io/mkdocs-exporter/getting-started/index.pdf ?

Regards.

adrienbrignon commented 5 months ago

Hello @boddedo,

Thank you so much for your kind words and for being my first sponsor, it means a lot. You can configure cover pages via your mkdocs.yml configuration file.

Cover pages are HTML files with a little bit of sugar provided by the MkDocs Exporter plugin (for instance, the data-teleport attribute to "teleport" an element somewhere else into the DOM).

The cover pages currently used by the documentation are located here:

Their syntax is in Jinja as the macros plugin is installed ; but its still entirely optional.

Styles are defined in the cover page itself via a <style> element that is teleported to the <head> during PDF generation. The background color of the front cover page is defined here, similar logic is used for the back cover page.

Hope this helps, feel free to comment if you have any additional concerns. You can also find an entry about configuring cover pages in the documentation.

Thank you again!

adrienbrignon commented 5 months ago

I'll be closing this issue.
Don't hesitate to reopen it if needed :)

Thanks