diff --git a/CHANGELOG b/CHANGELOG index ad5f19902..54c0c5702 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +mkdocs-material-7.0.3+insiders-2.1.0 (2021-02-26) + + * Added support for anchor tracking + mkdocs-material-7.0.3 (2021-02-26) * Fixed JavaScript errors in older browsers (target ES2020 -> ES2015) diff --git a/docs/changelog/insiders.md b/docs/changelog/insiders.md index 01ebf8d21..34171bb5a 100644 --- a/docs/changelog/insiders.md +++ b/docs/changelog/insiders.md @@ -6,6 +6,10 @@ template: overrides/main.html ## Material for MkDocs Insiders +### 2.1.0 _ February 26, 2021 + +- Added support for anchor tracking + ### 2.0.0 _ February 24, 2021 - Migrated Insiders to the new architecture diff --git a/docs/insiders.md b/docs/insiders.md index 89d7a5cd4..39a75f907 100644 --- a/docs/insiders.md +++ b/docs/insiders.md @@ -112,7 +112,8 @@ The following features are currently exclusively available to sponsors:
-- [x] [Section index pages :material-new-box:][21] +- [x] [Anchor tracking :material-new-box:][24] +- [x] [Section index pages][21] - [x] [Latest release tag][15] - [x] [Color palette toggle][16] - [x] [Sticky navigation tabs][20] @@ -171,12 +172,14 @@ the public for general availability. #### $ 5,000 – Aji Panca - [x] [Native Mermaid.js integration][23] +- [x] [Anchor tracking][24] [23]: reference/diagrams.md + [24]: setup/setting-up-navigation.md#anchor-tracking #### Future -- [ ] [Material for MkDocs Live Edit][24] +- [ ] [Material for MkDocs Live Edit][25] - [ ] Improved search result summaries - [ ] List of last searches - [ ] Table of contents follows active anchor @@ -186,7 +189,7 @@ the public for general availability. - [ ] New layouts and styles (e.g. vertical) - [ ] ... and much more ... - [24]: https://twitter.com/squidfunk/status/1338252230265360391 + [25]: https://twitter.com/squidfunk/status/1338252230265360391 ### Goals completed @@ -232,10 +235,10 @@ implemented behind feature flags; all configuration changes are backward-compatible. This means that your users will be able to build the documentation locally with Material for MkDocs and when they push their changes, it can be built with Insiders (e.g. as part of GitHub Actions). Thus, it's -recommended to [install Insiders][25] only in CI, as you don't want to expose +recommended to [install Insiders][26] only in CI, as you don't want to expose your `GH_TOKEN` to users. - [25]: publishing-your-site.md#github-pages + [26]: publishing-your-site.md#github-pages ### Terms @@ -244,7 +247,7 @@ commercial project. Can we use Insiders under the same terms and conditions?_ Yes. Whether you're an individual or a company, you may use _Material for MkDocs Insiders_ precisely under the same terms as Material for MkDocs, which are given -by the [MIT license][26]. However, we kindly ask you to respect the following +by the [MIT license][27]. However, we kindly ask you to respect the following guidelines: - Please __don't distribute the source code__ of Insiders. You may freely use @@ -255,7 +258,7 @@ guidelines: - If you cancel your subscription, you're removed as a collaborator and will miss out on future updates of Insiders. However, you may __use the latest version__ that's available to you __as long as you like__. Just remember that - [GitHub deletes private forks][27]. + [GitHub deletes private forks][28]. - [26]: license.md - [27]: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository + [27]: license.md + [28]: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository diff --git a/docs/setup/setting-up-navigation.md b/docs/setup/setting-up-navigation.md index c73f7f8f3..f8fb2a659 100644 --- a/docs/setup/setting-up-navigation.md +++ b/docs/setup/setting-up-navigation.md @@ -41,6 +41,22 @@ _Material for MkDocs is the only MkDocs theme offering this feature._ [4]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/javascripts/integrations/instant/index.ts [5]: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest +### Anchor tracking + +[:octicons-file-code-24: Source][9] · +:octicons-unlock-24: Feature flag · +[:octicons-heart-fill-24:{: .mdx-heart } Insiders only][9]{: .mdx-insiders } + +When _anchor tracking_ is enabled, the URL in the address bar is automatically +updated with the active anchor as highlighted in the table of contents. Add the +following lines to `mkdocs.yml`: + +``` yaml +theme: + features: + - navigation.tracking +``` + ### Navigation tabs [:octicons-file-code-24: Source][6] · :octicons-unlock-24: Feature flag