1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2025-01-10 13:21:49 +01:00

Documentation (#7868)

* docs(admonitions): Add example for nested admonitions

* docs(admonitions): Update description of nested admonitions

* docs(admonitions): Update title for nested admonitions
This commit is contained in:
Niclas Heinz 2025-01-04 09:31:24 +01:00 committed by GitHub
parent 307fceb49f
commit 3d36ce799c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,6 +155,40 @@ links, formatting, ...) after the type qualifier:
</div>
### Nested admonitions
You can also include nested admonitions in your documentation. To do this, you
can use your existing admonitions and indent the desired ones:
``` markdown title="Nested Admonition"
!!! note "Outer Note"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
!!! note "Inner Note"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
<div class="result" markdown>
!!! note "Outer Note"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
!!! note "Inner Note"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
</div>
### Removing the title
Similar to [changing the title], the icon and title can be omitted entirely by