@@ -85,6 +85,36 @@ The following configuration options are available:
8585 externals_directory: assets/externals
8686 ` ` `
8787
88+ ` externals_exclude` { # externals-exclude }
89+
90+ : :octicons-milestone-24 : Default: _none_ – This option allows to exclude
91+ certain external assets from processing by the privacy plugin, so they will
92+ not be downloaded and bundled during the build :
93+
94+ ` ` ` yaml
95+ plugins:
96+ - privacy:
97+ externals_exclude: # (1)!
98+ - cdn.jsdelivr.net/npm/mathjax@3/*
99+ - giscus.app/*
100+ ` ` `
101+
102+ 1. [MathJax] loads web fonts for typesetting of mathematical content
103+ through relative URLs, and thus cannot be automatically bundled by the
104+ privacy plugin. [MathJax can be self-hosted].
105+
106+ Giscus, which we recommend to use as a [comment system], uses a technique
107+ called code-splitting to load only the code that is necessary, which
108+ is implemented via relative URLs. [Giscus can be self-hosted] as well.
109+
110+ Excluding specific external assets can be necessary if they contain
111+ dynamically created or relative URLs, which can't be resolved by the privacy
112+ plugin due to [technical limitations].
113+
114+ [MathJax] : ../reference/mathjax.md
115+ [MathJax can be self-hosted] : https://docs.mathjax.org/en/latest/web/hosting.html
116+ [Giscus can be self-hosted] : https://github.com/giscus/giscus/blob/main/SELF-HOSTING.md
117+ [comment system] : adding-a-comment-system.md
88118 [external assets] : # how-it-works
89119 [environment variable] : https://www.mkdocs.org/user-guide/configuration/#environment-variables
90120
0 commit comments