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

Print-site and privacy plugin #101

Open
pycolas opened this issue Apr 16, 2024 · 2 comments
Open

Print-site and privacy plugin #101

pycolas opened this issue Apr 16, 2024 · 2 comments

Comments

@pycolas
Copy link

pycolas commented Apr 16, 2024

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.

@timvink
Copy link
Owner

timvink commented Apr 16, 2024

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?

@pycolas
Copy link
Author

pycolas commented Apr 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants