Added more examples to documentation

This commit is contained in:
squidfunk 2023-09-20 19:48:59 +02:00
parent 156b52c29b
commit b2ed2cd111
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
3 changed files with 16 additions and 0 deletions

View File

@ -166,6 +166,7 @@ See our guide below to learn how to set [custom colors].
<!-- md:version 7.1.0 -->
<!-- md:default none -->
<!-- md:example color-palette-toggle -->
Offering a light _and_ dark color palette makes your documentation pleasant to
read at different times of the day, so the user can choose accordingly. Add the
@ -235,6 +236,7 @@ The following properties must be set for each toggle:
<!-- md:version 7.1.0 -->
<!-- md:default none -->
<!-- md:example color-palette-system-preference -->
Each color palette can be linked to the user's system preference for light and
dark appearance by using a media query. Simply add a `media` property next to
@ -268,6 +270,7 @@ default color palette.
<!-- md:sponsors -->
<!-- md:version insiders-4.18.0 -->
<!-- md:flag experimental -->
<!-- md:example color-palette-system-preference -->
Newer operating system allow to automatically switch between light and dark
appearance during day and night times. [Insiders] adds support for automatic
@ -313,6 +316,9 @@ reload the site.
### Custom colors
<!-- md:version 5.0.0 -->
<!-- md:example custom-colors -->
Material for MkDocs implements colors using [CSS variables] (custom
properties). If you want to customize the colors beyond the palette (e.g. to
use your brand-specific colors), you can add an [additional style sheet] and

View File

@ -16,6 +16,7 @@ automatically downloaded for [self-hosting].
<!-- md:version 8.4.0 -->
<!-- md:default none -->
<!-- md:flag experimental -->
<!-- md:example cookie-consent -->
Material for MkDocs ships a native and extensible cookie consent form which
asks the user for consent prior to sending requests to third parties. Add the
@ -284,6 +285,9 @@ For a list of all settings, please consult the [plugin documentation].
### Custom cookies
<!-- md:version 8.4.0 -->
<!-- md:example custom-cookies -->
If you've customized the [cookie consent] and added a `custom` cookie, the user
will be prompted to accept or reject your custom cookie. Once the user accepts
or rejects the cookie consent, or [changes the settings], the page reloads[^1].

View File

@ -112,6 +112,9 @@ setting:
### Adding tags
<!-- md:version 8.2.0 -->
<!-- md:example tags -->
When the [built-in tags plugin] is enabled, tags can be added for a document
with the front matter `tags` property. Add the following lines at the top of a
Markdown file:
@ -153,6 +156,9 @@ search preview, which now allows to __find pages by tags__.
### Adding a tags index
<!-- md:version 8.2.0 -->
<!-- md:example tags -->
The [built-in tags plugin] allows to define a file to render a [tags index]
[tags.tags_file], which can be any page that is part of the `nav` section. To
add a tags index, create a page, e.g. `tags.md`: