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

Render relative links with a `project_url` setting #11

Closed cspaier closed 9 months ago

cspaier commented 9 months ago

Hello, First of all, I would like to thank you for your work. I was desperate to find a maintained plugin achieving mkdocs -> pdf export.

At the moment, the relatives links are not rendered in pdf. Maybe we could add a project_url optional setting where users could set their root url allowing us to render relatives links.

For instance, say we have somewhere a link toward ../assets/folder/file.txt on documentation page docs/exemple.md hosted at http://mydoc.com/exemple/.

I would set project_url : http://mydoc.com in mkdocs.yml and, in the pdf, the link would direct toward http://mydocs.com/assets/folder/file.txt

I hope my explanations makes some kind of sense. Thanks again for your work!

adrienbrignon commented 9 months ago

Hello again @cspaier,

Thank you for opening an issue and for the kind words, its appreciated.

I will make sure to check that out.

In the meantime, maybe you'll have some luck using a plugin such as mkdocs-site-urls? Make sure that it runs before mkdocs-exporter.

adrienbrignon commented 9 months ago

Hello @cspaier,

With the release of version 5.1.0, your issue should now be resolved.

Feel free to get back to me if needed.

cspaier commented 7 months ago

Hello, Sorry for the late reply, I was unable to get back to this until now.

Thank you for your answer and your work.

Sadly, I am unable to test it as my OS (linux mint) is no longer supported by playwright. I am aware I could set up a docker but I feel it's an overkill for such a task.

Thanks again for your work and your reactivity on this.

Best!