File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed
Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,19 @@ markdown_extensions:
213213
214214The following configuration options are supported :
215215
216+ ` title` { # toc-title }
217+
218+ : :octicons-milestone-24 : Default: _automatically set_ – This option sets the
219+ title of the table of contents navigation in the right sidebar, which is
220+ normally automatically sourced from the translations for the [site language]
221+ as set in `mkdocs.yml` :
222+
223+ ` ` ` yaml
224+ markdown_extensions:
225+ - toc:
226+ title: On this page
227+ ` ` `
228+
216229` permalink` { # toc-permalink }
217230
218231: :octicons-milestone-24 : Default: `false` – This option adds an anchor link
@@ -301,6 +314,7 @@ own risk.
301314
302315 [Table of Contents] : https://python-markdown.github.io/extensions/toc/
303316 [Table of Contents support] : https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0
317+ [site language] : ../changing-the-language.md#site-language
304318 [Slugs] : https://facelessuser.github.io/pymdown-extensions/extras/slugs/
305319
306320# ## Tables
Original file line number Diff line number Diff line change 22 This file was automatically generated - do not edit
33-#}
44{% import "partials/language.html" as lang with context %}
5- < nav class ="md-nav md-nav--secondary " aria-label ="{{ lang.t('toc.title') }} ">
5+ {% set title = title | default(lang.t("toc.title")) %}
6+ {% if "toc" in config.mdx_configs and config.mdx_configs.toc.title %}
7+ {% set title = config.mdx_configs.toc.title %}
8+ {% endif %}
9+ < nav class ="md-nav md-nav--secondary " aria-label ="{{ title }} ">
610 {% set toc = page.toc %}
711 {% set first = toc | first %}
812 {% if first and first.level == 1 %}
1115 {% if toc %}
1216 < label class ="md-nav__title " for ="__toc ">
1317 < span class ="md-nav__icon md-icon "> </ span >
14- {{ lang.t("toc. title") }}
18+ {{ title }}
1519 </ label >
1620 < ul class ="md-nav__list " data-md-component ="toc " data-md-scrollfix >
1721 {% for toc_item in toc %}
Original file line number Diff line number Diff line change 2222
2323{% import "partials/language.html" as lang with context %}
2424
25+ <!-- Determine title -->
26+ {% set title = title | default(lang.t("toc.title")) %}
27+ {% if "toc" in config.mdx_configs and config.mdx_configs.toc.title %}
28+ {% set title = config.mdx_configs.toc.title %}
29+ {% endif %}
30+
2531<!-- Table of contents -->
26- < nav class ="md-nav md-nav--secondary " aria-label ="{{ lang.t('toc. title') }} ">
32+ < nav class ="md-nav md-nav--secondary " aria-label ="{{ title }} ">
2733 {% set toc = page.toc %}
2834
2935 <!--
4147 {% if toc %}
4248 < label class ="md-nav__title " for ="__toc ">
4349 < span class ="md-nav__icon md-icon "> </ span >
44- {{ lang.t("toc. title") }}
50+ {{ title }}
4551 </ label >
4652 < ul class ="md-nav__list " data-md-component ="toc " data-md-scrollfix >
4753 {% for toc_item in toc %}
You can’t perform that action at this time.
0 commit comments