From 3d36ce799c61c6b2d9d1e69ab086481cc84b16a5 Mon Sep 17 00:00:00 2001 From: Niclas Heinz Date: Sat, 4 Jan 2025 09:31:24 +0100 Subject: [PATCH] Documentation (#7868) * docs(admonitions): Add example for nested admonitions * docs(admonitions): Update description of nested admonitions * docs(admonitions): Update title for nested admonitions --- docs/reference/admonitions.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/reference/admonitions.md b/docs/reference/admonitions.md index 02f9fe2c2..7c4753450 100644 --- a/docs/reference/admonitions.md +++ b/docs/reference/admonitions.md @@ -155,6 +155,40 @@ links, formatting, ...) after the type qualifier: +### 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. +``` + +
+ +!!! 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. +
+ ### Removing the title Similar to [changing the title], the icon and title can be omitted entirely by