Skip to content

Admonition Blocks

Uses the Admonition extension.

Todo

find a way to have notes without title but with an icon on a colored background on the left of the text box instead of on the top

a good example is another MkDocs theme that can be found at:

https://yakworks.github.io/mkdocs-material-components/blocks/#examples

Basic usage

Todo

Fix text being too low in title line.

General note

Source Code
!!! note
    meow

!!! seealso


Note

meow

Seealso

No title & custom title (applies to all blocks)

Source Code
!!! note ""
    I am no one. I have no title.

!!! note "This is my personal note"
    This note is unlike most other notes because it has a custom title.


I am no one. I have no title.

This is my personal note

This note is unlike most other notes because it has a custom title.

Abstract, Information, Tip

Source Code
!!! abstract
    woof

!!! summary

!!! tldr

!!! info
    meow...

!!! todo

!!! tip
    woof

!!! hint

!!! important


Abstract

woof

Summary

Tldr

Info

meow…

Todo

Tip

woof

Hint

Important

Success, Failure

Source Code
!!! success
    meow!

!!! check

!!! done

!!! failure
    woof... woof.

!!! fail

!!! missing


Success

meow!

Check

Done

Failure

woof… woof.

Fail

Missing

Warning, Danger, Bug

Source Code
!!! warning
    woof!

!!! caution

!!! attention

!!! danger
    woof! woof!

!!! error

!!! bug
    woof...


Warning

woof!

Caution

Attention

Danger

woof! woof!

Error

Bug

woof…

Question, Example, Quote

Source Code
!!! question
    meow?

!!! help

!!! faq

!!! example
    meow, meow, meow.

!!! snippet
    mw

!!! quote
    woof woof, woof, woof.

!!! cite


Question

meow?

Help

Faq

Example

meow, meow, meow.

Snippet

mw

Error

snippet not displaying the same icon as example

Quote

woof woof, woof, woof.

Cite

Combined usage

Collapsible (applies to all blocks)

Source Code
??? tip "Collapsible block"
    Collapsible content initially hidden

???+ warning "Collapsible block"
    Collapsible content initially shown

??? tip "Empty collapsible block, initially collapsed"

???+ warning "Empty collapsible block, initially expanded"


Collapsible block

Collapsible content initially hidden

Collapsible block

Collapsible content initially shown

Empty collapsible block, initially collapsed
Empty collapsible block, initially expanded

Nested

Source Code
!!! quote "Ancient"
    "I am Ozymandias, King of Kings.

    !!! quote "Egypt"
        If any want to know how great I am and where I lie,

        !!! quote "Nile"
            let him outdo me in my work."


Ancient

“I am Ozymandias, King of Kings.

Egypt

If any want to know how great I am and where I lie,

Nile

let him outdo me in my work.”

With code block as content

Source Code
!!! example
    Using the powerful `Superfences` [extension][pymdown-superfences] to render code blocks here:

    ```php hl_lines="3 5" linenums="24"
    function human_test() {
        if empty($soul) {
            return 'php';
        } else {
            return 'kitty';
        }
    }
    ```


Example

Using the powerful Superfences extension to render code blocks here:

function human_test() {
    if empty($soul) {
        return 'php';
    } else {
        return 'kitty';
    }
}

With table as content

Source Code
!!! example
    | Center    | Left     | Right       |
    | :-------: | :------- | ----------: |
    | Alpha One | B1       | C1          |
    | A2        | Beta Two | C2          |
    | A3        | B3       | Gamma Three |


Example

Center Left Right
Alpha One B1 C1
A2 Beta Two C2
A3 B3 Gamma Three