File tree 3 files changed +28
-4
lines changed
3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,19 @@ markdown_extensions:
213
213
214
214
The following configuration options are supported :
215
215
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
+
216
229
` permalink` { # toc-permalink }
217
230
218
231
: :octicons-milestone-24 : Default: `false` – This option adds an anchor link
@@ -301,6 +314,7 @@ own risk.
301
314
302
315
[Table of Contents] : https://python-markdown.github.io/extensions/toc/
303
316
[Table of Contents support] : https://github.com/squidfunk/mkdocs-material/releases/tag/0.1.0
317
+ [site language] : ../changing-the-language.md#site-language
304
318
[Slugs] : https://facelessuser.github.io/pymdown-extensions/extras/slugs/
305
319
306
320
# ## Tables
Original file line number Diff line number Diff line change 2
2
This file was automatically generated - do not edit
3
3
-#}
4
4
{% 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 }} ">
6
10
{% set toc = page.toc %}
7
11
{% set first = toc | first %}
8
12
{% if first and first.level == 1 %}
11
15
{% if toc %}
12
16
< label class ="md-nav__title " for ="__toc ">
13
17
< span class ="md-nav__icon md-icon "> </ span >
14
- {{ lang.t("toc. title") }}
18
+ {{ title }}
15
19
</ label >
16
20
< ul class ="md-nav__list " data-md-component ="toc " data-md-scrollfix >
17
21
{% for toc_item in toc %}
Original file line number Diff line number Diff line change 22
22
23
23
{% import "partials/language.html" as lang with context %}
24
24
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
+
25
31
<!-- 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 }} ">
27
33
{% set toc = page.toc %}
28
34
29
35
<!--
41
47
{% if toc %}
42
48
< label class ="md-nav__title " for ="__toc ">
43
49
< span class ="md-nav__icon md-icon "> </ span >
44
- {{ lang.t("toc. title") }}
50
+ {{ title }}
45
51
</ label >
46
52
< ul class ="md-nav__list " data-md-component ="toc " data-md-scrollfix >
47
53
{% for toc_item in toc %}
You can’t perform that action at this time.
0 commit comments