@@ -43,9 +43,9 @@ _Material for MkDocs is the only MkDocs theme offering this feature._
43
43
44
44
### Anchor tracking
45
45
46
- [:octicons-file-code-24: Source][9 ] ·
46
+ [:octicons-file-code-24: Source][6 ] ·
47
47
:octicons-unlock-24: Feature flag ·
48
- [:octicons-heart-fill-24:{ .mdx-heart } Insiders only][9 ]{ .mdx-insiders }
48
+ [:octicons-heart-fill-24:{ .mdx-heart } Insiders only][6 ]{ .mdx-insiders }
49
49
50
50
When _anchor tracking_ is enabled, the URL in the address bar is automatically
51
51
updated with the active anchor as highlighted in the table of contents. Add the
@@ -57,9 +57,11 @@ theme:
57
57
- navigation.tracking
58
58
` ` `
59
59
60
+ [6] : ../insiders/index.md
61
+
60
62
# ## Navigation tabs
61
63
62
- [:octicons-file-code-24 : Source][6 ] · :octicons-unlock-24: Feature flag
64
+ [:octicons-file-code-24 : Source][7 ] · :octicons-unlock-24: Feature flag
63
65
64
66
When _tabs_ are enabled, top-level sections are rendered in a menu layer below
65
67
the header for viewports above `1220px`, but remain as-is on mobile.[^1] Add
@@ -82,22 +84,21 @@ theme:
82
84
83
85
=== "With tabs"
84
86
85
- [![With tabs][7 ]][7 ]
87
+ [![With tabs][8 ]][8 ]
86
88
87
89
=== "Without tabs"
88
90
89
- [![Without tabs][8 ]][8 ]
91
+ [![Without tabs][9 ]][9 ]
90
92
91
- [6 ] : https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/tabs.html
92
- [7 ] : ../assets/screenshots/navigation-tabs.png
93
- [8 ] : ../assets/screenshots/navigation.png
93
+ [7 ] : https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/tabs.html
94
+ [8 ] : ../assets/screenshots/navigation-tabs.png
95
+ [9 ] : ../assets/screenshots/navigation.png
94
96
95
97
# ### Sticky navigation tabs
96
98
97
- [:octicons-file-code-24 : Source][9 ] ·
99
+ [:octicons-file-code-24 : Source][10 ] ·
98
100
:octicons-unlock-24 : Feature flag ·
99
- :octicons-beaker-24 : Experimental ·
100
- [:octicons-heart-fill-24:{ .mdx-heart } Insiders only][9]{ .mdx-insiders }
101
+ :octicons-beaker-24 : Experimental
101
102
102
103
When _sticky tabs_ are enabled, navigation tabs will lock below the header and
103
104
always remain visible when scrolling down. Just add the following two feature
@@ -112,19 +113,19 @@ theme:
112
113
113
114
=== "With sticky tabs"
114
115
115
- [![With sticky tabs][10 ]][10 ]
116
+ [![With sticky tabs][11 ]][11 ]
116
117
117
118
=== "Without sticky tabs"
118
119
119
- [![Without sticky tabs][11 ]][11 ]
120
+ [![Without sticky tabs][12 ]][12 ]
120
121
121
- [9 ] : ../insiders/index.md
122
- [10 ] : ../assets/screenshots/navigation-tabs-sticky.png
123
- [11 ] : ../assets/screenshots/navigation-tabs-collapsed.png
122
+ [10 ] : https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/header.html
123
+ [11 ] : ../assets/screenshots/navigation-tabs-sticky.png
124
+ [12 ] : ../assets/screenshots/navigation-tabs-collapsed.png
124
125
125
126
# ## Navigation sections
126
127
127
- [:octicons-file-code-24 : Source][12 ] ·
128
+ [:octicons-file-code-24 : Source][13 ] ·
128
129
:octicons-unlock-24 : Feature flag
129
130
130
131
When _sections_ are enabled, top-level sections are rendered as groups in the
@@ -139,22 +140,22 @@ theme:
139
140
140
141
=== "With sections"
141
142
142
- [![With sections][13 ]][13 ]
143
+ [![With sections][14 ]][14 ]
143
144
144
145
=== "Without sections"
145
146
146
- [![Without sections][8 ]][8 ]
147
+ [![Without sections][9 ]][9 ]
147
148
148
- [12 ] : https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/nav-item.html
149
- [13 ] : ../assets/screenshots/navigation-sections.png
149
+ [13 ] : https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/nav-item.html
150
+ [14 ] : ../assets/screenshots/navigation-sections.png
150
151
151
152
Both feature flags, _tabs_ and _sections_, can be combined with each other. If
152
153
both feature flags are enabled, sections are rendered for level 2 navigation
153
154
items.
154
155
155
156
# ## Navigation expansion
156
157
157
- [:octicons-file-code-24 : Source][12 ] ·
158
+ [:octicons-file-code-24 : Source][13 ] ·
158
159
:octicons-unlock-24 : Feature flag
159
160
160
161
When _expansion_ is enabled, the left sidebar will expand all collapsible
@@ -169,20 +170,19 @@ theme:
169
170
170
171
=== "With expansion"
171
172
172
- [![With expansion][14 ]][14 ]
173
+ [![With expansion][15 ]][15 ]
173
174
174
175
=== "Without expansion"
175
176
176
- [![Without expansion][8 ]][8 ]
177
+ [![Without expansion][9 ]][9 ]
177
178
178
- [14 ] : ../assets/screenshots/navigation-expand.png
179
+ [15 ] : ../assets/screenshots/navigation-expand.png
179
180
180
181
# ## Section index pages
181
182
182
- [:octicons-file-code-24 : Source][9 ] ·
183
+ [:octicons-file-code-24 : Source][16 ] ·
183
184
:octicons-unlock-24 : Feature flag ·
184
- :octicons-beaker-24 : Experimental ·
185
- [:octicons-heart-fill-24:{ .mdx-heart } Insiders only][9]{ .mdx-insiders }
185
+ :octicons-beaker-24 : Experimental
186
186
187
187
When _section index pages_ are enabled, documents can be directly attached to
188
188
sections, which is particularly useful for providing overview pages. Add the
@@ -196,11 +196,11 @@ theme:
196
196
197
197
=== "With section index pages"
198
198
199
- [![With expansion][15 ]][15 ]
199
+ [![With expansion][17 ]][17 ]
200
200
201
201
=== "Without section index pages"
202
202
203
- [![Without expansion][16 ]][16 ]
203
+ [![Without expansion][18 ]][18 ]
204
204
205
205
In order to link a page to a section, create a new document with the name
206
206
` index.md` in the respective folder, and add it to the beginning of your
@@ -216,23 +216,16 @@ nav:
216
216
` ` `
217
217
218
218
_This feature flag can be combined with all other feature flags, e.g. [tabs][1]
219
- and [sections][2], except for table of contents [navigation integration][17].
220
- Note that it doesn't rely on third-party plugins[^2]._
221
-
222
- [^2] :
223
- If you don't want to use the native integration, the
224
- [mkdocs-section-index][18] plugin might be an alternative. However, note
225
- that this plugin may not be compatible with all navigation-related features
226
- offered by Material for MkDocs.
219
+ and [sections][2], except for table of contents [navigation integration][19]._
227
220
228
- [15 ] : ../assets/screenshots/navigation-index-on.png
229
- [16 ] : ../assets/screenshots/navigation-index-off .png
230
- [17 ] : # navitation-intergation
231
- [18 ] : https://github.com/oprypin/mkdocs-section-index
221
+ [16 ] : https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/nav-item.html
222
+ [17 ] : ../assets/screenshots/navigation-index-on .png
223
+ [18 ] : ../assets/screenshots/navigation-index-off.png
224
+ [19 ] : # navigation-integration
232
225
233
226
# ## Back-to-top button
234
227
235
- [:octicons-file-code-24 : Source][19 ] ·
228
+ [:octicons-file-code-24 : Source][20 ] ·
236
229
:octicons-unlock-24 : Feature flag
237
230
238
231
A _back-to-top button_ can be shown when the user, after scrolling down, starts
@@ -245,11 +238,10 @@ theme:
245
238
- navigation.top
246
239
` ` `
247
240
248
- [![back-to-top button][20 ]][20 ]
241
+ [![back-to-top button][21 ]][21 ]
249
242
250
- [19] : https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/layout/_top.scss
251
- [20] : ../assets/screenshots/back-to-top.png
252
- [21] : https://squidfunk.github.io/mkdocs-material-insiders/setup/setting-up-navigation/#back-to-top-button
243
+ [20] : https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/layout/_top.scss
244
+ [21] : ../assets/screenshots/back-to-top.png
253
245
254
246
# ## Table of contents
255
247
@@ -287,7 +279,7 @@ customize its appearance:
287
279
: :octicons-milestone-24 : Default: `headerid.slugify` – This option allows for
288
280
customization of the slug function. For some languages, the default may not
289
281
produce good and readable identifiers – consider using another slug function
290
- like for example those from [Python Markdown Extensions][24 ] :
282
+ like for example those from [Python Markdown Extensions][25 ] :
291
283
292
284
=== "Unicode"
293
285
@@ -358,7 +350,7 @@ theme:
358
350
359
351
=== "Separate table of contents"
360
352
361
- [![Separate table of contents][7 ]][7 ]
353
+ [![Separate table of contents][8 ]][8 ]
362
354
363
355
[26] : https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/layout/_nav.scss
364
356
[27] : ../assets/screenshots/toc-integrate.png
0 commit comments