mkpdfs-mkdocs-plugin icon indicating copy to clipboard operation
mkpdfs-mkdocs-plugin copied to clipboard

Avoid printing disqus section in pdf

Open jvleminc opened this issue 3 years ago • 3 comments

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 avatar Jul 13 '21 19:07 jvleminc

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

jvleminc avatar Jul 14 '21 18:07 jvleminc

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 avatar Jul 14 '21 20:07 comwes

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.

jvleminc avatar Jul 14 '21 20:07 jvleminc