From feb7f11888af82ee99bc4023817bee8b02fe4a38 Mon Sep 17 00:00:00 2001 From: daaf Date: Sat, 13 Mar 2021 15:18:55 -0500 Subject: [PATCH] Fixed broken link to icons-emojis.md --- docs/reference/admonitions.md | 133 +++++++++++++++++----------------- 1 file changed, 67 insertions(+), 66 deletions(-) diff --git a/docs/reference/admonitions.md b/docs/reference/admonitions.md index bc925f4e6..9d858c683 100644 --- a/docs/reference/admonitions.md +++ b/docs/reference/admonitions.md @@ -19,42 +19,43 @@ The [Admonition][2] extension, which is part of the standard Markdown library, is integrated with Material for MkDocs and can be enabled via `mkdocs.yml`: -``` yaml +```yaml markdown_extensions: - admonition ``` - [1]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/extensions/markdown/_admonition.scss - [2]: https://python-markdown.github.io/extensions/admonition/ +[1]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/extensions/markdown/_admonition.scss +[2]: https://python-markdown.github.io/extensions/admonition/ ### Details [:octicons-file-code-24: Source][3] ยท [:octicons-workflow-24: Extension][4] The [Details][4] extension, which is part of [Python Markdown Extensions][5], -adds the ability to __make admonitions collapsible__. It can be enabled via +adds the ability to **make admonitions collapsible**. It can be enabled via `mkdocs.yml`: -``` yaml +```yaml markdown_extensions: - pymdownx.details ``` - [3]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/extensions/pymdownx/_details.scss - [4]: https://facelessuser.github.io/pymdown-extensions/extensions/details/ - [5]: https://facelessuser.github.io/pymdown-extensions/ +[3]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/extensions/pymdownx/_details.scss +[4]: https://facelessuser.github.io/pymdown-extensions/extensions/details/ +[5]: https://facelessuser.github.io/pymdown-extensions/ ### SuperFences The [SuperFences][6] extension, which is also part of [Python Markdown -Extensions][5], allows for the __nesting of code and content blocks inside -admonitions__, and is therefore strongly recommended: +Extensions][5], allows for the **nesting of code and content blocks inside +admonitions**, and is therefore strongly recommended: -``` yaml +```yaml markdown_extensions: - pymdownx.superfences ``` - [6]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/ + +[6]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/ ## Usage @@ -64,11 +65,11 @@ content of the block then follows on the next line, indented by four spaces. _Example_: -``` markdown +```markdown !!! 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. +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. ``` _Result_: @@ -79,7 +80,7 @@ _Result_: nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa. - [7]: #supported-types +[7]: #supported-types ### Changing the title @@ -89,11 +90,11 @@ links, formatting, ...) after the type qualifier. _Example_: -``` markdown +```markdown !!! note "Phasellus posuere in sem ut cursus" - 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. +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. ``` _Result_: @@ -107,16 +108,16 @@ _Result_: ### Removing the title Similar to [changing the title][8], the icon and title can be omitted entirely -by adding an empty string directly after the type qualifier. Note that this +by adding an empty string directly after the type qualifier. Note that this will not work for [collapsible blocks][9]. _Example_: -``` markdown +```markdown !!! 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. +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. ``` _Result_: @@ -127,8 +128,8 @@ _Result_: nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa. - [8]: #changing-the-title - [9]: #collapsible-blocks +[8]: #changing-the-title +[9]: #collapsible-blocks ### Embedded content @@ -139,11 +140,11 @@ ability to nest arbitrary content inside admonitions. _Example_: -``` markdown +````markdown !!! 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. +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. ``` python def bubble_sort(items): @@ -156,7 +157,7 @@ _Example_: Nunc eu odio eleifend, blandit leo a, volutpat sapien. Phasellus posuere in sem ut cursus. Nullam sit amet tincidunt ipsum, sit amet elementum turpis. Etiam ipsum quam, mattis in purus vitae, lacinia fermentum enim. -``` +```` _Result_: @@ -178,7 +179,7 @@ _Result_: sem ut cursus. Nullam sit amet tincidunt ipsum, sit amet elementum turpis. Etiam ipsum quam, mattis in purus vitae, lacinia fermentum enim. - [10]: #superfences +[10]: #superfences ### Collapsible blocks @@ -189,11 +190,11 @@ start with `???`. _Example_: -``` markdown +```markdown ??? 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. +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. ``` _Result_: @@ -208,11 +209,11 @@ Adding a `+` after `???` will render the block as open on page load: _Example_: -``` markdown +```markdown ???+ 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. +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. ``` _Result_: @@ -223,7 +224,7 @@ _Result_: nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa. - [11]: #details +[11]: #details ### Inline blocks @@ -280,7 +281,7 @@ _If there's insufficient space to render the admonition next to the block, the admonition will stretch to the full width of the viewport, e.g. on mobile viewports._ - [12]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/_modifiers.scss +[12]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/main/_modifiers.scss ### Supported types @@ -289,7 +290,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `note`{ #note }, `seealso` -: !!! note +: !!! note Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -297,7 +298,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `abstract`{ #abstract }, `summary`, `tldr` -: !!! abstract +: !!! abstract Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -305,7 +306,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `info`{ #info }, `todo` -: !!! info +: !!! info Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -313,7 +314,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `tip`{ #tip }, `hint`, `important` -: !!! tip +: !!! tip Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -321,7 +322,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `success`{ #success }, `check`, `done` -: !!! success +: !!! success Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -329,7 +330,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `question`{ #question }, `help`, `faq` -: !!! question +: !!! question Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -337,7 +338,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `warning`{ #warning }, `caution`, `attention` -: !!! warning +: !!! warning Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -345,7 +346,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `failure`{ #failure }, `fail`, `missing` -: !!! failure +: !!! failure Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -353,7 +354,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `danger`{ #danger }, `error` -: !!! danger +: !!! danger Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -361,7 +362,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `bug`{ #bug } -: !!! bug +: !!! bug Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -369,7 +370,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `example`{ #example } -: !!! example +: !!! example Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -377,7 +378,7 @@ the default type, and thus fallback for unknown type qualifiers, is `note`: `quote`{ #quote }, `cite` -: !!! quote +: !!! quote Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo @@ -391,9 +392,9 @@ If you want to add a custom admonition type, all you need is a color and an `svg` icon. Copy the icon's `svg` code from the [`.icons`][13] folder and add the following CSS to an [additional stylesheet][14]: -``` css +```css :root { - --md-admonition-icon--pied-piper: url('data:image/svg+xml;charset=utf-8,') + --md-admonition-icon--pied-piper: url('data:image/svg+xml;charset=utf-8,'); } .md-typeset .admonition.pied-piper, .md-typeset details.pied-piper { @@ -408,7 +409,7 @@ following CSS to an [additional stylesheet][14]: .md-typeset .pied-piper > summary::before { background-color: rgb(43, 155, 70); -webkit-mask-image: var(--md-admonition-icon--pied-piper); - mask-image: var(--md-admonition-icon--pied-piper); + mask-image: var(--md-admonition-icon--pied-piper); } ``` @@ -439,11 +440,11 @@ colors. [You can even add animations][15]. _Example_: -``` markdown +```markdown !!! pied-piper "Pied Piper" - 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. +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. ``` _Result_: @@ -454,6 +455,6 @@ _Result_: nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa. - [13]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons - [14]: ../customization.md#additional-css - [15]: ../icons-emojis.md#with-animations +[13]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons +[14]: ../customization.md#additional-css +[15]: ./icons-emojis.md#with-animations