Skip to content

Commit a0ff739

Browse files
committed
Updated documentation
1 parent 43cdb91 commit a0ff739

13 files changed

+224
-240
lines changed

docs/reference/admonitions.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -299,95 +299,95 @@ will stretch to the full width of the viewport, e.g. on mobile viewports.
299299
Following is a list of type qualifiers provided by Material for MkDocs, whereas
300300
the default type, and thus fallback for unknown type qualifiers, is `note`:
301301

302-
`note`{ #note }, ~~`seealso`~~ [^1]
302+
`note`{ #type-note }, ~~`seealso`~~ [^1]
303303

304304
: !!! note
305305

306306
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
307307
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
308308
purus auctor massa, nec semper lorem quam in massa.
309309

310-
`abstract`{ #abstract }, `summary`, `tldr`
310+
`abstract`{ #type-abstract }, `summary`, `tldr`
311311

312312
: !!! abstract
313313

314314
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
315315
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
316316
purus auctor massa, nec semper lorem quam in massa.
317317

318-
`info`{ #info }, `todo`
318+
`info`{ #type-info }, `todo`
319319

320320
: !!! info
321321

322322
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
323323
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
324324
purus auctor massa, nec semper lorem quam in massa.
325325

326-
`tip`{ #tip }, `hint`, `important`
326+
`tip`{ #type-tip }, `hint`, `important`
327327

328328
: !!! tip
329329

330330
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
331331
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
332332
purus auctor massa, nec semper lorem quam in massa.
333333

334-
`success`{ #success }, `check`, `done`
334+
`success`{ #type-success }, `check`, `done`
335335

336336
: !!! success
337337

338338
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
339339
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
340340
purus auctor massa, nec semper lorem quam in massa.
341341

342-
`question`{ #question }, `help`, `faq`
342+
`question`{ #type-question }, `help`, `faq`
343343

344344
: !!! question
345345

346346
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
347347
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
348348
purus auctor massa, nec semper lorem quam in massa.
349349

350-
`warning`{ #warning }, `caution`, `attention`
350+
`warning`{ #type-warning }, `caution`, `attention`
351351

352352
: !!! warning
353353

354354
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
355355
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
356356
purus auctor massa, nec semper lorem quam in massa.
357357

358-
`failure`{ #failure }, `fail`, `missing`
358+
`failure`{ #type-failure }, `fail`, `missing`
359359

360360
: !!! failure
361361

362362
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
363363
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
364364
purus auctor massa, nec semper lorem quam in massa.
365365

366-
`danger`{ #danger }, `error`
366+
`danger`{ #type-danger }, `error`
367367

368368
: !!! danger
369369

370370
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
371371
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
372372
purus auctor massa, nec semper lorem quam in massa.
373373

374-
`bug`{ #bug }
374+
`bug`{ #type-bug }
375375

376376
: !!! bug
377377

378378
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
379379
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
380380
purus auctor massa, nec semper lorem quam in massa.
381381

382-
`example`{ #example }
382+
`example`{ #type-example }
383383

384384
: !!! example
385385

386386
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et
387387
euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo
388388
purus auctor massa, nec semper lorem quam in massa.
389389

390-
`quote`{ #quote }, `cite`
390+
`quote`{ #type-quote }, `cite`
391391

392392
: !!! quote
393393

docs/reference/images.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,10 @@ _Result_:
120120

121121
Modern browsers provide [native support for lazy-loading images][lazy-loading]
122122
through the `loading=lazy` directive, which degrades to eager-loading in
123-
browsers without support
124-
125-
_Example_:
123+
browsers without support:
126124

127125
``` markdown
128126
![Placeholder](https://dummyimage.com/600x400/eee/aaa){ loading=lazy }
129127
```
130128

131-
_Result_:
132-
133-
![Placeholder](https://dummyimage.com/600x400/f5f5f5/aaaaaa&text=–%20Image%20–){ loading=lazy width=300 }
134-
135129
[lazy-loading]: https://caniuse.com/#feat=loading-lazy-attr

docs/setup/changing-the-colors.md

+3
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ in the [color schemes][palette.scheme] section:
312312
=== ":octicons-file-code-16: mkdocs.yml"
313313

314314
``` yaml
315+
theme:
316+
palette:
317+
scheme: youtube
315318
extra_css:
316319
- stylesheets/extra.css
317320
```

docs/setup/changing-the-language.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ The following properties must be set for each alternate language:
132132
the `hreflang` attribute of the link, improving discoverability via search
133133
engines.
134134

135-
[![Language selector]][Language selector]
135+
[![Language selector preview]][Language selector preview]
136136

137137
[alternate support]: https://github.com/squidfunk/mkdocs-material/releases/tag/7.0.0
138138
[site_url]: https://www.mkdocs.org/user-guide/configuration/#site_url
139139
[ISO 639-1 language code]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
140-
[Language selector]: ../assets/screenshots/language-selection.png
140+
[Language selector preview]: ../assets/screenshots/language-selection.png
141141

142142
### Directionality
143143

@@ -180,23 +180,31 @@ Click on a tile to change the directionality:
180180

181181
If you want to customize some of the translations for a language, just follow
182182
the guide on [theme extension] and create a new partial in the `overrides`
183-
folder. Then import the [translations] of your language as a fallback and only
183+
folder. Then, import the [translations] of the language as a fallback and only
184184
adjust the ones you want to override:
185185

186186
=== ":octicons-file-code-16: partials/languages/custom.html"
187187

188188
``` html
189-
<!-- Import translations for your language as fallback -->
190-
{% import "partials/languages/" ~ config.theme.language ~ ".html" as fallback %}
189+
<!-- Import translations for language and fallback -->
190+
{% import "partials/languages/de.html" as language %}
191+
{% import "partials/languages/en.html" as fallback %} <!-- (1) -->
192+
193+
<!-- Define custom translations -->
191194
{% macro override(key) %}{{ {
192-
"toc.title": "On this page" <!-- (1) -->
195+
"toc.title": "Auf dieser Seite" <!-- (2) -->
193196
}[key] }}{% endmacro %}
194197
195198
<!-- Re-export translations -->
196-
{% macro t(key) %}{{ override(key) or fallback.t(key) }}{% endmacro %}
199+
{% macro t(key) %}{{
200+
override(key) or language(key) or fallback.t(key)
201+
}}{% endmacro %}
197202
```
198203

199-
1. Check the [list of available languages], pick the translation you want
204+
1. Note that `en` must always be used as a fallback language, as it's the
205+
default theme language.
206+
207+
2. Check the [list of available languages], pick the translation you want
200208
to override for your language and add them here.
201209

202210
=== ":octicons-file-code-16: mkdocs.yml"

docs/setup/extensions/python-markdown-extensions.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ markdown_extensions:
154154

155155
The following configuration options are supported:
156156

157-
`mode`{ #mode }
157+
`mode`{ #critic-mode }
158158

159159
: :octicons-milestone-24: Default: `view` – This option defines how the markup
160160
should be parsed, i.e. whether to just `view` all suggested changes, or
@@ -265,7 +265,7 @@ The following configuration options are supported:
265265

266266
: :octicons-milestone-24: Default: _none_ – This option allows to list folders
267267
with additional icon sets to be used in Markdown or `mkdocs.yml`, which is
268-
explained in more detail in the [icon customization guide].
268+
explained in more detail in the [icon customization guide]:
269269

270270
``` yaml
271271
markdown_extensions:
@@ -318,7 +318,7 @@ markdown_extensions:
318318

319319
The following configuration options are supported:
320320

321-
`use_pygments`{ #use-pygments }
321+
`use_pygments`{ #highlight-use-pygments }
322322

323323
: :octicons-milestone-24: Default: `true` – This option allows to control
324324
whether highlighting should be carried out during build time using
@@ -365,7 +365,7 @@ The following configuration options are supported:
365365

366366
Note that [Highlight.js] has no affiliation with the Highlight extension.
367367

368-
`linenums`{ #linenums }
368+
`linenums`{ #highlight-linenums }
369369

370370
: :octicons-milestone-24: Default: `false` – This option will add line numbers
371371
to _all_ code blocks. If you wish to add line numbers to _some_, but not all
@@ -379,7 +379,7 @@ The following configuration options are supported:
379379
linenums: true
380380
```
381381

382-
`linenums_style`{ #linenums-style }
382+
`linenums_style`{ #highlight-linenums-style }
383383

384384
: :octicons-milestone-24: Default: `table` – The [Highlight] extension
385385
provides three ways to add line numbers, all of which are supported by
@@ -544,7 +544,7 @@ markdown_extensions:
544544

545545
The following configuration options are supported:
546546

547-
`custom_fences`{ #custom-fences }
547+
`custom_fences`{ #superfences-custom-fences }
548548

549549
: :octicons-milestone-24: Default: _none_ – This option allows to define a
550550
handler for custom fences, e.g. to preserve the definitions of [Mermaid.js]
@@ -603,7 +603,7 @@ markdown_extensions:
603603

604604
The following configuration options are supported:
605605

606-
`alternate_style`{ #alternate-style }
606+
`alternate_style`{ #tabbed-alternate-style }
607607

608608
: :octicons-milestone-24: Default: `false` · [:octicons-tag-24: 7.3.1]
609609
[Tabbed alternate support] – This option enables the [alternate style] of
@@ -652,7 +652,7 @@ markdown_extensions:
652652

653653
The following configuration options are supported:
654654

655-
`custom_checkbox`{ #custom-checkbox }
655+
`custom_checkbox`{ #tasklist-custom-checkbox }
656656

657657
: :octicons-milestone-24: Default: `false` · This option toggles the rendering
658658
style of checkboxes, replacing native checkbox styles with beautiful icons,
@@ -664,7 +664,7 @@ The following configuration options are supported:
664664
custom_checkbox: true
665665
```
666666

667-
`clickable_checkbox`{ #clickable-checkbox }
667+
`clickable_checkbox`{ #tasklist-clickable-checkbox }
668668

669669
: :octicons-milestone-24: Default: `false` · This option toggles whether
670670
checkboxes are clickable. As the state is not persisted, the use of this

docs/setup/extensions/python-markdown.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ markdown_extensions:
213213

214214
The following configuration options are supported:
215215

216-
`permalink`{ #permalink }
216+
`permalink`{ #toc-permalink }
217217

218218
: :octicons-milestone-24: Default: `false` – This option adds an anchor link
219219
containing the paragraph symbol `¶` or another custom symbol at the end of
@@ -236,7 +236,7 @@ The following configuration options are supported:
236236
permalink: ⚓︎
237237
```
238238

239-
`slugify`{ #slugify }
239+
`slugify`{ #toc-slugify }
240240

241241
: :octicons-milestone-24: Default: `headerid.slugify` – This option allows for
242242
customization of the slug function. For some languages, the default may not
@@ -259,7 +259,7 @@ The following configuration options are supported:
259259
slugify: !!python/name:pymdownx.slugs.uslugify_cased
260260
```
261261

262-
`toc_depth`{ #toc_depth }
262+
`toc_depth`{ #toc-depth }
263263

264264
: :octicons-milestone-24: Default: `6` – Define the range of levels to be
265265
included in the table of contents. This may be useful for project

docs/setup/setting-up-navigation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ hide:
317317
Material for MkDocs includes several keyboard shortcuts that make it possible
318318
to navigate your project documentation via keyboard. There're two modes:
319319

320-
`search`{ #search }
320+
`search`{ #mode-search }
321321

322322
: This mode is active when the _search is focused_. It provides several key
323323
bindings to make search accessible and navigable via keyboard:
@@ -326,7 +326,7 @@ to navigate your project documentation via keyboard. There're two modes:
326326
* ++esc++ , ++tab++ : close search dialog
327327
* ++enter++ : follow selected result
328328

329-
`global`{ #global }
329+
`global`{ #mode-global }
330330

331331
: This mode is active when _search is not focussed_ and when there's no other
332332
focussed element that is susceptible to keyboard input. The following keys

0 commit comments

Comments
 (0)