From 1d9d6782dd817807c8e710d3ccb11e3d1b20b333 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 6 Mar 2022 12:26:37 +0100 Subject: [PATCH] Documentation --- docs/setup/ensuring-data-privacy.md | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/setup/ensuring-data-privacy.md b/docs/setup/ensuring-data-privacy.md index ae30b56b7..8bb3f4bcf 100644 --- a/docs/setup/ensuring-data-privacy.md +++ b/docs/setup/ensuring-data-privacy.md @@ -85,6 +85,36 @@ The following configuration options are available: externals_directory: assets/externals ``` +`externals_exclude`{ #externals-exclude } + +: :octicons-milestone-24: Default: _none_ – This option allows to exclude + certain external assets from processing by the privacy plugin, so they will + not be downloaded and bundled during the build: + + ``` yaml + plugins: + - privacy: + externals_exclude: # (1)! + - cdn.jsdelivr.net/npm/mathjax@3/* + - giscus.app/* + ``` + + 1. [MathJax] loads web fonts for typesetting of mathematical content + through relative URLs, and thus cannot be automatically bundled by the + privacy plugin. [MathJax can be self-hosted]. + + Giscus, which we recommend to use as a [comment system], uses a technique + called code-splitting to load only the code that is necessary, which + is implemented via relative URLs. [Giscus can be self-hosted] as well. + + Excluding specific external assets can be necessary if they contain + dynamically created or relative URLs, which can't be resolved by the privacy + plugin due to [technical limitations]. + + [MathJax]: ../reference/mathjax.md + [MathJax can be self-hosted]: https://docs.mathjax.org/en/latest/web/hosting.html + [Giscus can be self-hosted]: https://github.com/giscus/giscus/blob/main/SELF-HOSTING.md + [comment system]: adding-a-comment-system.md [external assets]: #how-it-works [environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables