diff --git a/CHANGELOG b/CHANGELOG index d98b55b25..ce2c957da 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +mkdocs-material-9.0.11+insiders-4.30.0 (2023-02-06) + + * Rewrite of privacy plugin for concurrency, now twice as fast + * Added support for explicit inclusion for privacy plugin + * Added optimization support for privacy plugin (+ optimize plugin) + mkdocs-material-9.0.11 (2023-02-03) * Added Mastodon verification for social links (rel=me) diff --git a/docs/insiders/changelog.md b/docs/insiders/changelog.md index 2bf0b2822..a697205e6 100644 --- a/docs/insiders/changelog.md +++ b/docs/insiders/changelog.md @@ -2,6 +2,12 @@ ## Material for MkDocs Insiders +### 4.30.0 February 6, 2023 { id="4.30.0" } + +- Rewrite of privacy plugin for concurrency, now twice as fast +- Added support for explicit inclusion for privacy plugin +- Added optimization support for privacy plugin (+ optimize plugin) + ### 4.29.0 January 21, 2023 { id="4.29.0" } - Added built-in optimize plugin for automatically compressing images diff --git a/docs/insiders/index.md b/docs/insiders/index.md index 85cef750b..24490a55a 100644 --- a/docs/insiders/index.md +++ b/docs/insiders/index.md @@ -88,14 +88,15 @@ a handful of them, [thanks to our awesome sponsors]! ## What's in it for me? The moment you [become a sponsor][how to become a sponsor], you'll get __immediate -access to 22 additional features__ that you can start using right away, and +access to 23 additional features__ that you can start using right away, and which are currently exclusively available to sponsors:
+- [x] [Privacy plugin: optimization support] :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" } - [x] [Optimize plugin] :material-alert-decagram:{ .mdx-pulse title="Added on January 21, 2023" } - [x] [Navigation path] (Breadcrumbs) :material-alert-decagram:{ .mdx-pulse title="Added on January 14, 2023" } -- [x] [Typeset plugin] :material-alert-decagram:{ .mdx-pulse title="Added on December 20, 2022" } +- [x] [Typeset plugin] - [x] [Privacy plugin: external links] - [x] [Navigation subtitles] - [x] [Tags plugin: allow list] + [custom sorting] @@ -305,12 +306,13 @@ are released for general availability. - [x] [Typeset plugin] - [x] [Privacy plugin: external links] - [x] [Navigation path] (Breadcrumbs) -- [ ] Privacy plugin: optimization support +- [x] [Privacy plugin: optimization support] - [ ] Code block line wrapping [Optimize plugin]: ../setup/building-an-optimized-site.md#built-in-optimize-plugin [Typeset plugin]: ../reference/index.md#built-in-typeset-plugin [Privacy plugin: external links]: ../setup/ensuring-data-privacy.md#+privacy.external_links + [Privacy plugin: optimization support]: ../setup/ensuring-data-privacy.md#+privacy.external_assets_include [Navigation path]: ../setup/setting-up-navigation.md#navigation-path [Instant previews]: https://twitter.com/squidfunk/status/1466794654213492743 diff --git a/docs/reference/index.md b/docs/reference/index.md index 87c4c5cb2..49a90db22 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -7,7 +7,7 @@ within Markdown files. ## Configuration -### Built-in typeset plugin :material-alert-decagram:{ .mdx-pulse title="Added on December 20, 2022" } +### Built-in typeset plugin [:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · [:octicons-tag-24: insiders-4.27.0][Insiders] · diff --git a/docs/setup/ensuring-data-privacy.md b/docs/setup/ensuring-data-privacy.md index 9bc3d0e98..4d4e1d7a1 100644 --- a/docs/setup/ensuring-data-privacy.md +++ b/docs/setup/ensuring-data-privacy.md @@ -179,6 +179,19 @@ The following configuration options are available: enabled: !ENV [CI, false] ``` +[`concurrency`](#+privacy.concurrency){ #+privacy.concurrency } :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" } + +: :octicons-milestone-24: Default: _number of CPUs_ – This option specifies + how many CPUs the plugin is allowed to use when downloading external assets. + With more CPUs, the plugin can do more work in the same time, thus complete + its work faster. Concurrent processing can be disabled with: + + ``` yaml + plugins: + - privacy: + concurrency: 1 + ``` + [Insiders]: ../insiders/index.md [built-in plugins]: ../insiders/getting-started.md#built-in-plugins @@ -221,6 +234,37 @@ The following configuration options are available for external assets: The path must be defined relative to [`docs_dir`][docs_dir]. +[`external_assets_include`](#+privacy.external_assets_include){ #+privacy.external_assets_include } :material-alert-decagram:{ .mdx-pulse title="Added on February 6, 2023" } + +: :octicons-milestone-24: Default: _none_ – This option allows to only include + certain external assets for processing by the privacy plugin, so they will + be downloaded and bundled during the build: + + ``` yaml + plugins: + - privacy: + external_assets_include: + - unsplash.com/* + ``` + + !!! tip "Hosting images externally and optimizing them automatically" + + This option makes the [built-in privacy plugin] an excellent choice for + when you want to host assets like images outside of your git repository + in another location to keep them fresh and your repository lean. + + Additionally, as of [:octicons-tag-24: insiders-4.30.0][Insiders], the + built-in privacy plugin was entirely rewritten and now works perfectly + with the [built-in optimize plugin], which means that external assets + can be passed through the same optimization pipeline as the rest of your + documentation. This means you can store and edit unoptimized files + outside of your repository, and let both plugins built a highly + optimized site for you. + + If you want to implement separate pipelines, i.e., optimize some images + differently from others or exclude some images from downloading, you can + use multiple instances of the [built-in privacy plugin]. + [`external_assets_exclude`](#+privacy.external_assets_exclude){ #+privacy.external_assets_exclude } : :octicons-milestone-24: Default: _none_ – This option allows to exclude @@ -279,6 +323,7 @@ The following configuration options are available for external assets: [regular font]: changing-the-fonts.md#regular-font [example]: #example [technical limitations]: #limitations + [built-in optimize plugin]: building-an-optimized-site.md#built-in-optimize-plugin #### External links :material-alert-decagram:{ .mdx-pulse title="Added on October 18, 2022" }