Closed ZhiyuanChen closed 2 years ago
Thanks for reporting. I think we should add an exclusion list for the plugin, so scripts and/or domains can be excluded. Giscus self-hosting is challenging and needs more work than just inlining the script.
I've added exclusion patterns in 36af41a
. You can now specify Unix-style file name patterns which are matched against all external scripts to determine whether a script should be excluded from being bundled, and thus left as-is. In order to exclude Giscus and MathJax from bundling, you can use the following configuration:
- privacy:
externals_exclude:
- cdn.jsdelivr.net/npm/mathjax@3/*
- giscus.app/*
I'll add documentation for this new feature tomorrow and issue a new release, but it's already usable on master
. Also note that running MkDocs in verbose
mode will report all excluded assets: mkdocs build -v
I've also updated the JSON schema in a2f84565c.
Documentation was added in 1d9d6782d. I'll issue a new Insiders release later this day.
Released as part of 8.2.5+insiders-4.11.0.
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
Giscus
is not usable when enablingprivacy
pluginExpected behaviour
pass
Actual behaviour
Steps to reproduce
pass
Package versions
python 3.8.6
mkdocs 1.2.3
8.2.3+insiders.4.10.0
Configuration
System information
pass