Skip to content

mkdocs 常用命令

约 87 个字 33 行代码 预计阅读时间 1 分钟

https://squidfunk.github.io/mkdocs-material/reference/admonitions/

折叠框

文本折叠框

HTML
<details>
<summary>说明</summary>
<p>
你想折叠的一大段内容
</p>
</details>
内容概要

你想折叠的一大段内容

代码折叠框

Markdown
<details>
<summary>说明:</summary>
<p>
```python
```
</p>
</details>

效果:

说明:

Python

Old mkdocs.yml

YAML

描述框

Markdown
!!! note
    This is a note.

Note

This is a note.

Markdown
??? question "What is the meaning of life, the universe, and everything?"
What is the meaning of life, the universe, and everything?
Markdown
!!! abstract
    you can use 
    - note
    - abstract
    - info
    - tip
    - success
    - question
    - warning
    - failure
    - danger
    - bug
    - example
    - quote
Markdown
!!! note "note 标题"

    Lorem 

note 标题

Lorem

Text Only
??? note "折叠 note"

    Lorem 
折叠 note

Lorem

Text Only
???+ note "默认展开 note"

    Lorem 
默认展开 note

Lorem

add_circle2025-04-02 15:08:27update2025-04-05 13:31:27