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

Avoid printing disqus section in pdf #46

Open
jvleminc opened this issue Jul 13, 2021 · 3 comments
Open

Avoid printing disqus section in pdf #46

jvleminc opened this issue Jul 13, 2021 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@jvleminc
Copy link

Hi,

We implemented disqus for comments in our mkdocs, but when creating the pdf, below each mkdocs page the following is printed:

Please enable JavaScript to view the comments powered by Disqus. (https://disqus.com/?ref_noscript)

Any quick fix to avoid this?

@jvleminc
Copy link
Author

Finally I fixed this quickly by eliminating this message from the disqus no javascript tags.

@comwes
Copy link
Owner

comwes commented Jul 14, 2021

Hi @jvleminc,
Happy you've find out a fix for this.
Indeed I think that's the best option, Because unfortunately javascript is not supported by weasyprint (We have face the same problem with latex code generated by javascript).
Maybe I'll add in the css the style to hide noscript. Will try to include the fix in release 1.1.0

KR,

@comwes comwes added the enhancement New feature or request label Jul 14, 2021
@comwes comwes added this to the Version 1.1.0 milestone Jul 14, 2021
@jvleminc
Copy link
Author

Excellent. Yes, in this case, the JS part was ignored but disqus's , containing the above text, tags were included.

Also, I think it would be good, in general, to have some kind of tag or annotation that allows to exclude elements from the pdf versions.

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

No branches or pull requests

2 participants