mkdocs-print-site-plugin icon indicating copy to clipboard operation
mkdocs-print-site-plugin copied to clipboard

Print-site and privacy plugin

Open pycolas opened this issue 4 months ago • 2 comments

Hi,

I use material's privacy plugin for offline usage. Problem is that the print-page generated by print-site plugin is not handle by privacy plugin. So external assets are not downloaded for offline usage.

In mkdocs.yml I try to put privacy plugin before or after print-site plugin, but it doesn't change the result.

Any ideas ?

Thanks.

pycolas avatar Apr 16 '24 07:04 pycolas

Hi @pycolas,

Thanks for letting me know.

I scanned the source code of the privacy plugin, and the problem is 1) links are re-written, but the URLs might be wrong and 2) the on_post_build step does not include the print page.

I can probably call the functions manually to ensure compatibility inside this plugin. It would really help if you could make a small reproducible example, that I could use as a starting point. Would you be willing to help out?

timvink avatar Apr 16 '24 19:04 timvink

Hi @timvink,

Yes I can try to help. :)

I reproduced this issue with your own plugin docs, by adding the privacy plugin. If you browse http://localhost:8000/mkdocs-print-site-plugin/ you sill see that no external assets are downloaded. But on print_page.html they are many of them. See logs attached.

https://github.com/pycolas/mkdocs-print-site-plugin/blob/master/mkdocs.yml#L19

logs.txt

pycolas avatar Apr 22 '24 12:04 pycolas