obsidian-markdown

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

obsidian-markdown: Obsidian Flavored Markdown

obsidian-markdown:Obsidian风味Markdown

Reference this skill when writing any wiki page. Obsidian extends standard Markdown with wikilinks, embeds, callouts, and properties. Getting syntax wrong causes broken links, invisible callouts, or malformed frontmatter.
Cross-reference: If the kepano/obsidian-skills plugin is installed, prefer its canonical obsidian-markdown skill for authoritative Obsidian syntax reference. Otherwise, use the reference below. See also github.com/kepano/obsidian-skills.

编写任何维基页面时请参考本技能文档。Obsidian在标准Markdown基础上扩展了维基链接、嵌入内容、提示框和属性功能。语法错误会导致链接失效、提示框不可见或前置格式损坏。
交叉参考:如果已安装kepano/obsidian-skills插件,优先使用其官方obsidian-markdown技能作为Obsidian语法的权威参考。否则,请使用下方参考内容。另见 github.com/kepano/obsidian-skills

Wikilinks

维基链接

Internal links use double brackets. The filename without extension.
SyntaxWhat it does
[[Note Name]]
Basic link
[[Note Name|Display Text]]
Aliased link (shows "Display Text")
[[Note Name#Heading]]
Link to a specific heading
[[Note Name#^block-id]]
Link to a specific block
Rules:
  • Case-sensitive on some systems. Match the exact filename.
  • No path needed: Obsidian resolves by filename uniqueness.
  • If two files have the same name, use
    [[Folder/Note Name]]
    to disambiguate.

内部链接使用双括号,链接内容为不含扩展名的文件名。
语法功能
[[Note Name]]
基础链接
[[Note Name|Display Text]]
别名链接(显示“Display Text”)
[[Note Name#Heading]]
链接至特定标题
[[Note Name#^block-id]]
链接至特定区块
规则:
  • 在部分系统中区分大小写,请严格匹配文件名。
  • 无需路径:Obsidian会通过文件名唯一性自动解析。
  • 若存在同名文件,使用
    [[Folder/Note Name]]
    来区分。

Embeds

嵌入内容

Embeds use
!
before the wikilink. They display the content inline.
SyntaxWhat it does
![[Note Name]]
Embed a full note
![[Note Name#Heading]]
Embed a section
![[image.png]]
Embed an image
![[image.png|300]]
Embed image with width 300px
![[document.pdf]]
Embed a PDF (Obsidian renders natively)
![[audio.mp3]]
Embed audio

嵌入内容需在维基链接前添加
!
,内容会直接显示在页面内。
语法功能
![[Note Name]]
嵌入完整笔记
![[Note Name#Heading]]
嵌入指定章节
![[image.png]]
嵌入图片
![[image.png|300]]
嵌入宽度为300px的图片
![[document.pdf]]
嵌入PDF(Obsidian可原生渲染)
![[audio.mp3]]
嵌入音频

Callouts

提示框

Callouts are blockquotes with a type keyword. They render as styled alert boxes.
markdown
> [!note]
> Default informational callout.

> [!note] Custom Title
> Callout with a custom title.

> [!note]- Collapsible (closed by default)
> Click to expand.

> [!note]+ Collapsible (open by default)
> Click to collapse.
提示框是带有类型关键字的块引用,会渲染为样式化的提示框。
markdown
> [!note]
> 默认信息类提示框。

> [!note] Custom Title
> 自定义标题的提示框。

> [!note]- Collapsible (closed by default)
> 点击展开。

> [!note]+ Collapsible (open by default)
> 点击收起。

All callout types

所有提示框类型

TypeAliasesUse for
note
:General notes
abstract
summary
,
tldr
Summaries
info
:Information
todo
:Action items
tip
hint
,
important
Tips and highlights
success
check
,
done
Positive outcomes
question
help
,
faq
Open questions
warning
caution
,
attention
Warnings
failure
fail
,
missing
Errors or failures
danger
error
Critical issues
bug
:Known bugs
example
:Examples
quote
cite
Quotations
contradiction
:Conflicting information (wiki convention)

类型别名适用场景
note
:通用笔记
abstract
summary
,
tldr
内容摘要
info
:信息说明
todo
:行动项
tip
hint
,
important
提示与重点内容
success
check
,
done
积极结果
question
help
,
faq
待解决问题
warning
caution
,
attention
警告信息
failure
fail
,
missing
错误或失败情况
danger
error
关键问题
bug
:已知漏洞
example
:示例内容
quote
cite
引用内容
contradiction
:冲突信息(维基约定)

Properties (Frontmatter)

属性(前置格式)

Obsidian renders YAML frontmatter as a Properties panel. Rules:
yaml
---
type: concept                    # plain string
title: "Note Title"              # quoted if it contains special chars
created: 2026-04-08              # date as YYYY-MM-DD (not ISO datetime)
updated: 2026-04-08
tags:
  - tag-one                      # list items use - format
  - tag-two
status: developing
related:
  - "[[Other Note]]"             # wikilinks must be quoted in YAML
sources:
  - "[[source-page]]"
---
Rules:
  • Flat YAML only. Never nest objects.
  • Dates as
    YYYY-MM-DD
    , not
    2026-04-08T00:00:00
    .
  • Lists as
    - item
    , not inline
    [a, b, c]
    .
  • Wikilinks in YAML must be quoted:
    "[[Page]]"
    .
  • tags
    field: Obsidian reads this as the tag list, searchable in vault.

Obsidian会将YAML前置格式渲染为属性面板。规则如下:
yaml
---
type: concept                    # 纯字符串
title: "Note Title"              # 包含特殊字符时需加引号
created: 2026-04-08              # 日期格式为YYYY-MM-DD(而非ISO日期时间格式)
updated: 2026-04-08
tags:
  - tag-one                      # 列表项使用-格式
  - tag-two
status: developing
related:
  - "[[Other Note]]"             # YAML中的维基链接必须加引号
sources:
  - "[[source-page]]"
---
规则:
  • 仅使用扁平化YAML,切勿嵌套对象。
  • 日期格式为
    YYYY-MM-DD
    ,而非
    2026-04-08T00:00:00
  • 列表使用
    - item
    格式,而非行内
    [a, b, c]
  • YAML中的维基链接必须加引号:
    "[[Page]]"
  • tags
    字段:Obsidian会将其识别为标签列表,可在库中搜索。

Tags

标签

Two valid forms:
markdown
#tag-name             : inline tag anywhere in the body
#parent/child-tag     : nested tag (shows hierarchy in tag pane)
In frontmatter:
yaml
tags:
  - research
  - ai/obsidian
Do not use
#
inside frontmatter tag lists. Just the tag name.

两种有效格式:
markdown
#tag-name             : 可在正文中任意位置使用的行内标签
#parent/child-tag     : 嵌套标签(在标签面板中显示层级结构)
在前置格式中:
yaml
tags:
  - research
  - ai/obsidian
前置格式的标签列表中请勿使用
#
,仅填写标签名称即可。

Text Formatting

文本格式

Standard Markdown plus Obsidian extensions:
SyntaxResult
**bold**
Bold
*italic*
Italic
~~strikethrough~~
Strikethrough
==highlight==
Highlighted text (yellow in Obsidian)
`inline code`
Inline code

标准Markdown加上Obsidian扩展功能:
语法效果
**bold**
粗体
*italic*
斜体
~~strikethrough~~
删除线
==highlight==
高亮文本(Obsidian中为黄色)
`inline code`
行内代码

Math

数学公式

Obsidian uses MathJax/KaTeX:
Inline math:
markdown
$E = mc^2$
Block math:
markdown
$$
\int_0^\infty e^{-x} dx = 1
$$

Obsidian使用MathJax/KaTeX渲染数学公式:
行内公式:
markdown
$E = mc^2$
块级公式:
markdown
$$
\int_0^\infty e^{-x} dx = 1
$$

Code Blocks

代码块

Standard fenced code blocks. Obsidian highlights all common languages:
markdown
```python
def hello():
    return "world"
```

标准围栏式代码块,Obsidian支持所有常用语言的语法高亮:
markdown
```python
def hello():
    return "world"
```

Tables

表格

Standard Markdown tables:
markdown
| Column A | Column B | Column C |
|----------|----------|----------|
| Value    | Value    | Value    |
| Value    | Value    | Value    |
Obsidian renders tables natively. No plugin needed.

标准Markdown表格:
markdown
| Column A | Column B | Column C |
|----------|----------|----------|
| Value    | Value    | Value    |
| Value    | Value    | Value    |
Obsidian可原生渲染表格,无需插件。

Mermaid Diagrams

Mermaid流程图

Obsidian renders Mermaid natively:
markdown
```mermaid
graph TD
    A[Start] --> B{Decision}
    B -->|Yes| C[End]
    B -->|No| D[Loop]
    D --> A
```
Supported:
graph
,
sequenceDiagram
,
gantt
,
classDiagram
,
pie
,
flowchart
.

Obsidian可原生渲染Mermaid流程图:
markdown
```mermaid
graph TD
    A[Start] --> B{Decision}
    B -->|Yes| C[End]
    B -->|No| D[Loop]
    D --> A
```
支持类型:
graph
sequenceDiagram
gantt
classDiagram
pie
flowchart

Footnotes

脚注

markdown
This sentence has a footnote.[^1]

[^1]: The footnote text goes here.

markdown
This sentence has a footnote.[^1]

[^1]: The footnote text goes here.

What NOT to Do

禁止操作

  • Do not use
    [link text](path/to/note.md)
    for internal links: use
    [[Note Name]]
    instead.
  • Do not use HTML inside callouts: stick to Markdown.
  • Do not use
    ##
    inside a callout body: headings don't render inside callouts.
  • Do not write
    tags: [a, b, c]
    inline in frontmatter: Obsidian prefers the list format.
  • Do not write ISO datetimes in frontmatter (
    2026-04-08T00:00:00Z
    ): use
    2026-04-08
    .
  • 请勿使用
    [link text](path/to/note.md)
    创建内部链接:请改用
    [[Note Name]]
  • 请勿在提示框内使用HTML:仅使用Markdown。
  • 请勿在提示框正文中使用
    ##
    :提示框内无法渲染标题。
  • 请勿在前置格式中使用行内标签列表
    tags: [a, b, c]
    :Obsidian优先使用列表格式。
  • 请勿在前置格式中使用ISO日期时间格式(
    2026-04-08T00:00:00Z
    ):请使用
    2026-04-08