z4pf1sh / z4pf1sh.github.io

The depths
https://z4pf1sh.github.io/
Other
0 stars 0 forks source link

Giscus broken by mkdocs-material's built-in Privacy plugin #19

Closed z4pf1sh closed 5 months ago

z4pf1sh commented 5 months ago

1532471 introduced a comment system powered by giscus, but was broken by mkdocs-material's built-in privacy plugin. With comments iframe shown as 404.

See mkdocs-material#4858 for more info.

z4pf1sh commented 5 months ago

The fix apparently is in mkdocs.yml:

plugins:
  - privacy:
      external_assets_exclude: 
        - giscus.app/*

However it looks like it's been changed from external_assets_exclude into assets_exclude, which is a sponsor-only feature. If this still does not work, the privacy plugin may have to be turned off.

z4pf1sh commented 5 months ago

After some dangerous YOLO-ing, disabling privacy plugin seemed to be the only solution (without sponsoring, sorry Martin!). Since we're already using Google Fonts to directly supply fonts, this seemed like an acceptable tradeoff.

niccokunzmann commented 2 months ago

I found another solution: HTML escape the URLs that should not be retrieved.

for l in b'https://giscus.app/client.js': print('&#' + hex(l)[1:]+';', end="")
https://giscus.app/client.js