Skip to content

Annotation

Annotations - Material for MkDocs

Configuration

此配置允许将注释添加到所有内联和块级元素,以及代码块,并将注释相互嵌套。将以下行添加到 mkdocs.yml :

markdown_extensions:
  - attr_list
  - md_in_html
  - pymdownx.superfences
查看其他配置选项: - Attribute Lists  属性列表 - Markdown in HTML  HTML 中的 Markdown - SuperFences

Usage

这是一段注释(1)。

  1. 🙋‍♂️ I'm an annotation! I can contain code, formatted
    text
    , images, … basically anything that can be written in Markdown.

Note

  • {.annotate} 必须换行书写。
  • 注释内容必须空一行。

嵌套注释

这是外部注释(1)。

  1. 🙋‍♂️ 这是内部注释(1)

    1. 🙋‍♀️ I'm an annotation as well!

Admonition中的注释

Admonition中的注释(1)

  • 不需要 {.annotate} 标记(2) 。
  • 注释需要空一行。
  1. 🙋‍♂️ I'm an annotation!
  2. 🙋‍♀️ I'm an annotation as well!

Content Tab中的注释

注释1(1)

  1. 🙋‍♂️ I'm an annotation!

注释2(1)

  1. 🙋‍♀️ I'm an annotation as well!

HTML标签实现注释

Lorem ipsum dolor sit amet, (1) consectetur adipiscing elit.

  1. 🙋‍♂️ I'm an annotation!