@@ -199,28 +199,38 @@ The following configuration options are available:
199
199
200
200
The following configuration options are available for external assets :
201
201
202
- [`external_assets `](#+privacy.external_assets ){ # +privacy.external_assets }
202
+ [`assets `](#+privacy.assets ){ # +privacy.assets }
203
203
204
- : :octicons-milestone-24 : Default: `bundle` – This option specifies what the
205
- plugin should do when encountering external assets. There are two options :
206
- while `report` will issue warning messages during the build, `bundle` will
207
- automatically download all external files and adjust all references :
204
+ : :octicons-milestone-24 : Default: `true` – This option specifies whether the
205
+ plugin should scan the HTML output to detect and process external assets :
208
206
209
207
` ` ` yaml
210
208
plugins:
211
209
- privacy:
212
- external_assets: bundle
210
+ assets: true
213
211
` ` `
214
212
215
213
If you've removed all external assets from your project via [customization],
216
- it's still a good idea to enable the plugin and set the mode to `report`,
217
- as the plugin will make sure that there are no hidden external links in any
218
- Markdown files that were unintentionally added.
214
+ it's still a good idea to enable the plugin, as the plugin will make sure
215
+ that there are no hidden external links in any Markdown files that were
216
+ unintentionally added.
219
217
220
- Using `report ` in [strict mode] will make the build fail when external
218
+ Using `assets ` in [strict mode] will make the build fail when external
221
219
assets are detected.
222
220
223
- [`external_assets_dir`](#+privacy.external_assets_dir){ # +privacy.external_assets_dir }
221
+ [`assets_fetch`](#+privacy.assets_fetch){ # +privacy.assets_fetch }
222
+
223
+ : :octicons-milestone-24 : Default: `true` – This option specifies whether the
224
+ plugin should download external assets it encountered and bundle them with
225
+ your documentation :
226
+
227
+ ` ` ` yaml
228
+ plugins:
229
+ - privacy:
230
+ assets_fetch: true
231
+ ` ` `
232
+
233
+ [`assets_fetch_dir`](#+privacy.assets_fetch_dir){ # +privacy.assets_fetch_dir }
224
234
225
235
: :octicons-milestone-24 : Default: `assets/external` – This option
226
236
specifies where the downloaded [external assets] will be stored. It's
@@ -229,12 +239,12 @@ The following configuration options are available for external assets:
229
239
` ` ` yaml
230
240
plugins:
231
241
- privacy:
232
- external_assets_dir : assets/external
242
+ assets_fetch_dir : assets/external
233
243
` ` `
234
244
235
245
The path must be defined relative to [`docs_dir`][docs_dir].
236
246
237
- [`external_assets_include `](#+privacy.external_assets_include ){ # +privacy.external_assets_include } :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" }
247
+ [`assets_include `](#+privacy.assets_include ){ # +privacy.external_assets_include }
238
248
239
249
: :octicons-milestone-24 : Default: _none_ – This option allows to only include
240
250
certain external assets for processing by the privacy plugin, so they will
@@ -243,7 +253,7 @@ The following configuration options are available for external assets:
243
253
` ` ` yaml
244
254
plugins:
245
255
- privacy:
246
- external_assets_include :
256
+ assets_include :
247
257
- unsplash.com/*
248
258
` ` `
249
259
@@ -265,7 +275,7 @@ The following configuration options are available for external assets:
265
275
differently from others or exclude some images from downloading, you can
266
276
use multiple instances of the [built-in privacy plugin].
267
277
268
- [`external_assets_exclude `](#+privacy.external_assets_exclude ){ # +privacy.external_assets_exclude }
278
+ [`assets_exclude `](#+privacy.assets_exclude ){ # +privacy.assets_exclude }
269
279
270
280
: :octicons-milestone-24 : Default: _none_ – This option allows to exclude
271
281
certain external assets from processing by the privacy plugin, so they will
@@ -274,7 +284,7 @@ The following configuration options are available for external assets:
274
284
` ` ` yaml
275
285
plugins:
276
286
- privacy:
277
- external_assets_exclude : # (1)!
287
+ assets_exclude : # (1)!
278
288
- cdn.jsdelivr.net/npm/mathjax@3/*
279
289
- giscus.app/*
280
290
` ` `
@@ -333,7 +343,7 @@ The following configuration options are available for external assets:
333
343
334
344
The following configuration options are available for external links :
335
345
336
- [`external_links `](#+privacy.external_links ){ # +privacy.external_links }
346
+ [`links `](#+privacy.links ){ # +privacy.links }
337
347
338
348
: :octicons-milestone-24 : Default: `true` – This option specifies whether the
339
349
plugin should parse and process external links. If you want to speed up
@@ -342,10 +352,10 @@ The following configuration options are available for external links:
342
352
` ` ` yaml
343
353
plugins:
344
354
- privacy:
345
- external_links : !ENV [CI, false]
355
+ links : !ENV [CI, false]
346
356
` ` `
347
357
348
- [`external_links_attr_map `](#+privacy.external_links_attr_map ){ # +privacy.external_links_attr_map }
358
+ [`links_attr_map `](#+privacy.links_attr_map ){ # +privacy.links_attr_map }
349
359
350
360
: :octicons-milestone-24 : Default: _None_ – This option specifies custom
351
361
attributes that should be added to external links, like for example
@@ -354,11 +364,11 @@ The following configuration options are available for external links:
354
364
` ` ` yaml
355
365
plugins:
356
366
- privacy:
357
- external_links_attr_map :
367
+ links_attr_map :
358
368
target: _blank
359
369
` ` `
360
370
361
- [`external_links_noopener `](#+privacy.external_links_noopener ){ # +privacy.external_links_noopener }
371
+ [`links_noopener `](#+privacy.links_noopener ){ # +privacy.links_noopener }
362
372
363
373
: :octicons-milestone-24 : Default: `true` – This option specifies whether the
364
374
plugin should automatically add [`rel="noopener"`][noopener] to all links
@@ -367,7 +377,7 @@ The following configuration options are available for external links:
367
377
` ` ` yaml
368
378
plugins:
369
379
- privacy:
370
- external_links_noopener : true
380
+ links_noopener : true
371
381
` ` `
372
382
373
383
[noopener] : https://mathiasbynens.github.io/rel-noopener/
0 commit comments