Documentation

This commit is contained in:
squidfunk 2023-02-06 17:00:02 +01:00
parent c4e78567da
commit dd25ff4ad6
2 changed files with 24 additions and 20 deletions

View File

@ -21,15 +21,11 @@
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },
"cache": { "concurrency": {
"title": "Enable caching of downloads", "title": "Concurrency (number of CPUs)",
"type": "boolean", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#+privacy.concurrency",
"default": true "type": "number",
}, "default": 1
"cache_dir": {
"title": "Cache directory",
"type": "string",
"default": ".cache/plugin/privacy"
}, },
"external_assets": { "external_assets": {
"title": "External assets", "title": "External assets",
@ -37,15 +33,11 @@
"oneOf": [ "oneOf": [
{ {
"title": "Bundle external assets", "title": "Bundle external assets",
"enum": [ "enum": ["bundle"]
"bundle"
]
}, },
{ {
"title": "Report external assets as warnings", "title": "Report external assets as warnings",
"enum": [ "enum": ["report"]
"report"
]
} }
], ],
"default": "bundle" "default": "bundle"
@ -56,12 +48,24 @@
"type": "string", "type": "string",
"default": "assets/external" "default": "assets/external"
}, },
"external_assets_include": {
"title": "External assets to include",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#+privacy.external_assets_include",
"type": "array",
"items": {
"title": "External assets matching this pattern will be downloaded",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#+privacy.external_assets_include",
"pattern": ".*"
},
"uniqueItems": true,
"minItems": 1
},
"external_assets_exclude": { "external_assets_exclude": {
"title": "External assets to be excluded", "title": "External assets to exclude",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#+privacy.external_assets_exclude", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#+privacy.external_assets_exclude",
"type": "array", "type": "array",
"items": { "items": {
"title": "External assets matching this pattern will not be bundled", "title": "External assets matching this pattern will not be downloaded",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#+privacy.external_assets_exclude", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#+privacy.external_assets_exclude",
"pattern": ".*" "pattern": ".*"
}, },

View File

@ -336,13 +336,13 @@ The following configuration options are available for external links:
[`external_links`](#+privacy.external_links){ #+privacy.external_links } [`external_links`](#+privacy.external_links){ #+privacy.external_links }
: :octicons-milestone-24: Default: `true` This option specifies whether the : :octicons-milestone-24: Default: `true` This option specifies whether the
plugin should automatically annotate external links. By default, plugin should parse and process external links. If you want to speed up
[`rel="noopener"`][noopener] is added to all links with `target="_blank"`: local builds, you can use an [environment variable]:
``` yaml ``` yaml
plugins: plugins:
- privacy: - privacy:
external_links: true external_links: !ENV [CI, false]
``` ```
[`external_links_attr_map`](#+privacy.external_links_attr_map){ #+privacy.external_links_attr_map } [`external_links_attr_map`](#+privacy.external_links_attr_map){ #+privacy.external_links_attr_map }