From 8b8cd3b10190af5abc96ab8ebbec48332146381d Mon Sep 17 00:00:00 2001 From: squidfunk Date: Tue, 23 Apr 2024 16:35:54 +0700 Subject: [PATCH 1/2] Updated MkDocs to 1.6.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 02152934178..3ad18e1c102 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ # Requirements for core jinja2~=3.0 markdown~=3.2 -mkdocs~=1.5.3 +mkdocs~=1.6 mkdocs-material-extensions~=1.3 pygments~=2.16 pymdown-extensions~=10.2 From 2585b82be2e60334b5066299d53727cedd3e8871 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 25 Apr 2024 10:51:05 +0700 Subject: [PATCH 2/2] Fixed all anchors after turning on validation --- docs/blog/posts/blog-support-just-landed.md | 12 ++++++------ docs/blog/posts/chinese-search-support.md | 2 +- docs/blog/posts/search-better-faster-smaller.md | 13 +++---------- docs/blog/posts/the-past-present-and-future.md | 2 +- docs/conventions.md | 2 +- docs/insiders/faq/sponsoring.md | 4 ++-- docs/insiders/getting-started.md | 13 +++---------- docs/insiders/index.md | 2 +- docs/philosophy.md | 2 +- docs/plugins/search.md | 2 +- docs/plugins/tags.md | 4 ++-- docs/reference/admonitions.md | 2 +- docs/setup/changing-the-language.md | 2 +- 13 files changed, 24 insertions(+), 38 deletions(-) diff --git a/docs/blog/posts/blog-support-just-landed.md b/docs/blog/posts/blog-support-just-landed.md index 9b0efa2c804..8d83ecf307a 100644 --- a/docs/blog/posts/blog-support-just-landed.md +++ b/docs/blog/posts/blog-support-just-landed.md @@ -78,7 +78,7 @@ nav: project, and not in a subdirectory. For more information, see the [`blog_dir`][blog_dir] configuration option. - [blog_dir]: ../../setup/setting-up-a-blog.md#+blog.blog_dir + [blog_dir]: ../../plugins/blog.md#config.blog_dir #### Blog setup @@ -182,12 +182,12 @@ which allow for fine-tuning the output. You can configure post slugs, general behavior and much more. [exact same Markdown flavor]: ../../reference/index.md - [post slugs]: ../../setup/setting-up-a-blog.md#+blog.post_url_format - [draft]: ../../setup/setting-up-a-blog.md#drafts - [This behavior can be changed]: ../../setup/setting-up-a-blog.md#+blog.draft + [post slugs]: ../../plugins/blog.md#config.post_url_format + [draft]: ../../plugins/blog.md#meta.draft + [This behavior can be changed]: ../../plugins/blog.md#config.draft [live preview server]: ../../creating-your-site.md#previewing-as-you-write - [archive]: ../../setup/setting-up-a-blog.md#archive - [category]: ../../setup/setting-up-a-blog.md#categories + [archive]: ../../plugins/blog.md#config.archive + [category]: ../../plugins/blog.md#config.categories [Blog]: blog-support-just-landed/blog.png [Blog post]: blog-support-just-landed/blog-post.png [Adding an excerpt]: ../../setup/setting-up-a-blog.md#adding-an-excerpt diff --git a/docs/blog/posts/chinese-search-support.md b/docs/blog/posts/chinese-search-support.md index 0652696b4ed..0b843593ac8 100644 --- a/docs/blog/posts/chinese-search-support.md +++ b/docs/blog/posts/chinese-search-support.md @@ -78,6 +78,6 @@ improved, please [open an issue]. [jieba]: https://pypi.org/project/jieba/ [zero-width whitespace]: https://en.wikipedia.org/wiki/Zero-width_space - [separator]: ../../setup/setting-up-site-search.md#separator + [separator]: ../../plugins/search.md#config.separator [q=支持]: ?q=支持 [open an issue]: https://github.com/squidfunk/mkdocs-material/issues/new/choose diff --git a/docs/blog/posts/search-better-faster-smaller.md b/docs/blog/posts/search-better-faster-smaller.md index 5e3ab2d3d1d..dee51099df4 100644 --- a/docs/blog/posts/search-better-faster-smaller.md +++ b/docs/blog/posts/search-better-faster-smaller.md @@ -36,7 +36,7 @@ implementation. If you immediately want to learn what's new, skip to the [section just after that][what's new]._ [search]: ../../setup/setting-up-site-search.md - [multilingual]: ../../setup/setting-up-site-search.md#lang + [multilingual]: ../../plugins/search.md#config.lang [offline-capable]: ../../setup/building-for-offline-usage.md [what's new]: #whats-new @@ -206,7 +206,7 @@ more magic involved, e.g., search results are [post-processed] and [rescored] to account for some shortcomings of [lunr], but in general, this is how data gets into and out of the index. - [separator]: ../../setup/setting-up-site-search.md#search-separator + [separator]: ../../plugins/search.md#config.separator [default tokenizer]: https://github.com/olivernn/lunr.js/blob/aa5a878f62a6bba1e8e5b95714899e17e8150b38/lunr.js#L413-L456 [post-processed]: https://github.com/squidfunk/mkdocs-material/blob/ec7ccd2b2d15dd033740f388912f7be7738feec2/src/assets/javascripts/integrations/search/_/index.ts#L249-L272 [rescored]: https://github.com/squidfunk/mkdocs-material/blob/ec7ccd2b2d15dd033740f388912f7be7738feec2/src/assets/javascripts/integrations/search/_/index.ts#L274-L275 @@ -486,7 +486,7 @@ digit `\d`, which leaves version numbers discoverable. Searching for [:octicons-search-24: 7.2.6][q=7.2.6] brings up the [7.2.6] release notes. [q=7.2.6]: ?q=7.2.6 - [7.2.6]: ../../changelog/index.md#726-_-september-1-2021 + [7.2.6]: ../../changelog/index.md#7.2.6 #### HTML/XML tags @@ -499,19 +499,12 @@ following expression to the separator allows for just that: &[lg]t; ``` -Searching for [:octicons-search-24: custom search worker script][q=script] -brings up the section on [custom search] and matches the `script` tag among the -other search terms discovered. - --- _We've only just begun to scratch the surface of the new possibilities tokenizer lookahead brings. If you found other useful expressions, you're invited to share them in the comment section._ - [q=script]: ?q=custom+search+worker+script - [custom search]: ../../setup/setting-up-site-search.md#custom-search - ### Accurate highlighting Highlighting is the last step in the process of search and involves the diff --git a/docs/blog/posts/the-past-present-and-future.md b/docs/blog/posts/the-past-present-and-future.md index a95a722148b..40d4b8fedd7 100644 --- a/docs/blog/posts/the-past-present-and-future.md +++ b/docs/blog/posts/the-past-present-and-future.md @@ -169,7 +169,7 @@ __55__ times, `mkdocs-material-insiders` was shipped __72__ times. [Code annotations]: ../../reference/code-blocks.md#adding-annotations [Code annotations: strip comments]: ../../reference/code-blocks.md#stripping-comments [Code block titles]: ../../reference/code-blocks.md#adding-a-title - [Code block line anchors]: ../../setup/extensions/python-markdown-extensions.md#anchor-linenums + [Code block line anchors]: ../../setup/extensions/python-markdown-extensions.md#+pymdownx.highlight.anchor_linenums [Color palette toggle]: ../../setup/changing-the-colors.md#color-palette-toggle [Content tabs: improved support]: ../../reference/content-tabs.md [Content tabs: auto-linking]: ../../reference/content-tabs.md#linked-content-tabs diff --git a/docs/conventions.md b/docs/conventions.md index f7773cc5e02..0363412ab0a 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -69,7 +69,7 @@ Several features are implemented through MkDocs excellent plugin architecture, some of which are built-in and distributed with Material for MkDocs, so no installation is required. -### – Markdown extension { data-toc-label="Markdown extension" } +### – Markdown extension { data-toc-label="Markdown extension" #extension } This symbol denotes that the thing described is a Markdown extension, which can be enabled in `mkdocs.yml` and adds additional functionality to the Markdown diff --git a/docs/insiders/faq/sponsoring.md b/docs/insiders/faq/sponsoring.md index 4be502070d6..0bdcb61e186 100644 --- a/docs/insiders/faq/sponsoring.md +++ b/docs/insiders/faq/sponsoring.md @@ -476,7 +476,7 @@ overrides via [configuration inheritance]. See the [getting started guide] for more information. [configuration inheritance]: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance - [getting started guide]: ../getting-started.md#caveats + [getting started guide]: ../getting-started.md [Card grids]: ../../reference/grids.md?h=grids#using-card-grids ## Support @@ -530,7 +530,7 @@ report it on our [issue tracker] in the public community repository. When submitting the bug report, please ensure that you do not include any private Insiders' source code, as we want to uphold our fair use policy. -[__How can I report an issue in my customizations?__](#customizations-issues){ #costumisations-issues } +[__How can I report an issue in my customizations?__](#customizations-issues){ #customizations-issues } Please note, that we do not offer support for customizations as they vary widely and are specific to individual cases. Our support is primarily focused on diff --git a/docs/insiders/getting-started.md b/docs/insiders/getting-started.md index cb6c1985119..d959fed3819 100644 --- a/docs/insiders/getting-started.md +++ b/docs/insiders/getting-started.md @@ -42,13 +42,13 @@ your private repositories. Material for MkDocs Insiders can be installed with `pip`. You will normally want to install the latest release but can also install a -specific older release or even the latest development version. +specific older release or even the latest development version. Make sure you have the `GH_TOKEN` variable set as instructed above. === "Specific release" - Pick the corresponding tag from the [list of tags] for the Insiders - repository. In the `pip` command below, replace the tag at the + Pick the corresponding tag from the [list of tags] for the Insiders + repository. In the `pip` command below, replace the tag at the end of the URL with the one you want. ``` sh @@ -180,12 +180,5 @@ Of course, you can also enable both groups with: CI=1 INSIDERS=1 mkdocs build ``` - [^1]: - Previously we recommended to use [configuration inheritance] to work around - this limitations, but the brand new [built-in group plugin] is a much better - approach, as it allows you to use a single configuration file for building - your project with the community edition and Insiders version of Material - for MkDocs. - [built-in group plugin]: ../plugins/group.md [configuration inheritance]: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance diff --git a/docs/insiders/index.md b/docs/insiders/index.md index 1ff4f547f1e..e928011c4fd 100644 --- a/docs/insiders/index.md +++ b/docs/insiders/index.md @@ -555,7 +555,7 @@ exclusive to Insiders, it's recommended to split configuration into a base See the [getting started guide] for more information. [configuration inheritance]: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance - [getting started guide]: getting-started.md#caveats + [getting started guide]: getting-started.md ### Payment diff --git a/docs/philosophy.md b/docs/philosophy.md index cff6baaff7e..83658cb18ca 100644 --- a/docs/philosophy.md +++ b/docs/philosophy.md @@ -5,7 +5,7 @@ philosophy behind the project, in order to make sure it aligns with your goals. This page explains the design principles anchored in Material for MkDocs, and discusses the [conventions] used in this documentation. - [conventions]: #conventions + [conventions]: conventions.md ## Design principles diff --git a/docs/plugins/search.md b/docs/plugins/search.md index 517b2b12818..603501cda54 100644 --- a/docs/plugins/search.md +++ b/docs/plugins/search.md @@ -94,7 +94,7 @@ The following settings are available: #### - + Use this setting to enable or disable the plugin when [building your project]. diff --git a/docs/plugins/tags.md b/docs/plugins/tags.md index 761e6112372..87a26890c6f 100644 --- a/docs/plugins/tags.md +++ b/docs/plugins/tags.md @@ -109,7 +109,7 @@ The following settings are available for tags: #### - + Use this setting to enable or disable rendering of tags. The plugin still @@ -425,7 +425,7 @@ Then, just reference the listing identifier: See the [listings section] for a list of all available settings. - [listings section]: #listing_configuration + [listings section]: #listing-configuration --- diff --git a/docs/reference/admonitions.md b/docs/reference/admonitions.md index 0bcf9e86346..02f9fe2c27a 100644 --- a/docs/reference/admonitions.md +++ b/docs/reference/admonitions.md @@ -285,7 +285,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`[^1]: [^1]: Previously, some of the supported types defined more than one qualifier. For example, authors could use `summary` or `tldr` as alternative qualifiers - to render an [`abstract`](#type:abstract) admonition. As this increased the + to render an [`abstract`](#+type:abstract) admonition. As this increased the size of the CSS that is shipped with Material for MkDocs, the additional type qualifiers are now all deprecated and will be removed in the next major version. This will also be mentioned in the upgrade guide. diff --git a/docs/setup/changing-the-language.md b/docs/setup/changing-the-language.md index 164f27a0cf6..054ef83fbc2 100644 --- a/docs/setup/changing-the-language.md +++ b/docs/setup/changing-the-language.md @@ -43,7 +43,7 @@ the default slug function works. Consider using a [Unicode-aware slug function]. [single language per document]: https://www.w3.org/International/questions/qa-html-language-declarations.en#attributes [language selector]: #site-language-selector - [Unicode-aware slug function]: extensions/python-markdown.md#toc-slugify + [Unicode-aware slug function]: extensions/python-markdown.md#+toc.slugify [add a new language]: https://github.com/squidfunk/mkdocs-material/issues/new?template=04-add-a-translation.yml&title=Add+translations+for+... ### Site language selector