From 31eafc9d4bd4d3f77c99a8b42169356f12b3b525 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 8 Dec 2023 10:29:59 +0100 Subject: [PATCH] Updated Insiders changelog --- CHANGELOG | 13 +++++ docs/insiders/changelog/index.md | 13 +++++ docs/insiders/index.md | 7 ++- docs/plugins/projects.md | 75 +++++++++++++++++++++++++++++ docs/plugins/social.md | 1 - docs/schema/plugins/projects.json | 17 +++++++ docs/schema/plugins/social.json | 16 ++++++ docs/setup/changing-the-language.md | 32 ++++++++++++ 8 files changed, 171 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6c8e646ff..715d918a8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,16 @@ +mkdocs-material-9.5.1+insiders-4.47.0 (2023-12-08) + + * Added support for staying on page when switching languages + * Added configurable logging capabilities to projects plugin + * Removed temporary warning on blog plugin authors file format change + * Fixed projects plugin logging messages twice on Linux systems + * Fixed projects plugin trying to hoist theme assets of divergent themes + * Fixed compatibility of optimize plugin and projects plugin + * Fixed compatibility of social plugin and projects plugin + * Fixed #6448: Code line selection broken for code blocks with custom ids + * Fixed #6437: Projects plugin crashing for certain site URL configurations + * Fixed #6414: Projects plugin doesn't prefix messages coming from projects + mkdocs-material-9.5.1 (2023-12-08) * Updated Greek translations diff --git a/docs/insiders/changelog/index.md b/docs/insiders/changelog/index.md index 7a70643a8..1b14a2025 100644 --- a/docs/insiders/changelog/index.md +++ b/docs/insiders/changelog/index.md @@ -2,6 +2,19 @@ ## Material for MkDocs Insiders +### 4.47.0 December 8, 2023 { id="4.47.0" } + +- Added support for staying on page when switching languages +- Added configurable logging capabilities to projects plugin +- Removed temporary warning on blog plugin authors file format change +- Fixed projects plugin logging messages twice on Linux systems +- Fixed projects plugin trying to hoist theme assets of divergent themes +- Fixed compatibility of optimize plugin and projects plugin +- Fixed compatibility of social plugin and projects plugin +- Fixed #6448: Code line selection broken for code blocks with custom ids +- Fixed #6437: Projects plugin crashing for certain site URL configurations +- Fixed #6414: Projects plugin doesn't prefix messages coming from projects + ### 4.46.0 November 26, 2023 { id="4.46.0" } - Added support for author profiles in blog plugin diff --git a/docs/insiders/index.md b/docs/insiders/index.md index f90da3354..c23b3ab95 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 19 additional features__ that you can __start using now__, and +access to 20 additional features__ that you can __start using now__, and which are currently exclusively available to sponsors:
+- [x] [Stay on page when switching languages] :material-alert-decagram:{ .mdx-pulse title="Added on December 8, 2023" } - [x] [Blog plugin: author profiles] :material-alert-decagram:{ .mdx-pulse title="Added on November 26, 2023" } - [x] [Blog plugin: advanced settings] :material-alert-decagram:{ .mdx-pulse title="Added on November 23, 2023" } -- [x] [Projects plugin] :material-alert-decagram:{ .mdx-pulse title="Added on July 29, 2023" } +- [x] [Projects plugin] - [x] [Instant prefetching] - [x] [Social plugin: custom layouts] - [x] [Social plugin: background images] @@ -308,6 +309,7 @@ are released for general availability. - [x] [Social plugin: background images] - [x] [Code range selection] - [x] [Code annotations: custom selectors] +- [x] [Stay on page when switching languages] - [ ] more to come... [Projects plugin]: ../plugins/projects.md @@ -315,6 +317,7 @@ are released for general availability. [Social plugin: background images]: ../setup/setting-up-social-cards.md#+social.cards_layout_params.background_image [Code range selection]: ../reference/code-blocks.md#code-selection-button [Code annotations: custom selectors]: ../reference/code-blocks.md#custom-selectors + [Stay on page when switching languages]: ../setup/changing-the-language.md#stay-on-page ### Goals completed diff --git a/docs/plugins/projects.md b/docs/plugins/projects.md index d1d22e737..1d07229e9 100644 --- a/docs/plugins/projects.md +++ b/docs/plugins/projects.md @@ -183,6 +183,81 @@ plugins: cache_dir: my/custom/dir ``` +### Logging + +The following settings are available for logging: + +--- + +#### + + + + + +Use this setting to control whether the plugin should display log messages from +projects when building your site. While not neing recommended, you can disable +logging with: + +``` yaml +plugins: + - projects: + log: false +``` + +--- + +#### + + + + + +Use this setting to control the log level that the plugin should employ when +encountering errors, which requires that the [`log`][config.log] setting is +enabled. The following log levels are available: + +=== "`error`" + + ``` yaml + plugins: + - projects: + log_level: error + ``` + + Only errors are reported. + +=== "`warn`" + + ``` yaml + plugins: + - projects: + log_level: warn + ``` + + Errors and warnings are reported, terminating the build in + [`strict`][mkdocs.strict] mode. + +=== "`info`" + + ``` yaml + plugins: + - projects: + log_level: info + ``` + + Errors, warnings and informational messages are reported. + +=== "`debug`" + + ``` yaml + plugins: + - projects: + log_level: debug + ``` + + All messages are reported, including debug messages. + ### Projects The following settings are available for projects: diff --git a/docs/plugins/social.md b/docs/plugins/social.md index c90423229..5c340f965 100644 --- a/docs/plugins/social.md +++ b/docs/plugins/social.md @@ -277,7 +277,6 @@ enabled. The following log levels are available: Errors are only reported when using the `--verbose` flag. - ### Social cards The following settings are available for social card generation: diff --git a/docs/schema/plugins/projects.json b/docs/schema/plugins/projects.json index 1ea7d8522..29dac4aa5 100644 --- a/docs/schema/plugins/projects.json +++ b/docs/schema/plugins/projects.json @@ -36,6 +36,23 @@ "type": "string", "default": ".cache/plugins/projects" }, + "log": { + "title": "Enable logging", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/projects/#config.log", + "type": "boolean", + "default": true + }, + "log_level": { + "title": "Log level", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/projects/#config.log_level", + "enum": [ + "error", + "warn", + "info", + "debug" + ], + "default": "warn" + }, "projects": { "title": "Enable projects", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/projects/#config.projects", diff --git a/docs/schema/plugins/social.json b/docs/schema/plugins/social.json index 82a20ce4b..a8eeae9d2 100644 --- a/docs/schema/plugins/social.json +++ b/docs/schema/plugins/social.json @@ -42,6 +42,22 @@ "type": "boolean", "default": true }, + "log": { + "title": "Enable logging", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/social/#config.log", + "type": "boolean", + "default": true + }, + "log_level": { + "title": "Log level", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/social/#config.log_level", + "enum": [ + "warn", + "info", + "ignore" + ], + "default": "warn" + }, "cards_dir": { "title": "Social cards directory", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/social/#config.cards_dir", diff --git a/docs/setup/changing-the-language.md b/docs/setup/changing-the-language.md index d23a86611..1519206e2 100644 --- a/docs/setup/changing-the-language.md +++ b/docs/setup/changing-the-language.md @@ -97,6 +97,38 @@ The following properties are available for each alternate language: [ISO 639-1 language code]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes [Language selector preview]: ../assets/screenshots/language-selection.png +#### Stay on page :material-alert-decagram:{ .mdx-pulse title="Added on December 8, 2023" } + + + + + +[Insiders] improves the user experience when switching between languages, e.g., +if language `en` and `de` contain a page with the same path name, the user will +stay on the current page: + +=== "Insiders" + + ``` + docs.example.com/en/ -> docs.example.com/de/ + docs.example.com/en/foo/ -> docs.example.com/de/foo/ + docs.example.com/en/bar/ -> docs.example.com/de/bar/ + ``` + +=== "Material for MkDocs" + + ``` + docs.example.com/en/ -> docs.example.com/de/ + docs.example.com/en/foo/ -> docs.example.com/de/ + docs.example.com/en/bar/ -> docs.example.com/de/ + ``` + +No configuration is necessary. We're working hard on improving multi-language +support in 2024, including making switching between languages even more seamless +in the future. + + [Insiders]: ../insiders/index.md + ### Directionality