obsidian-markdown
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseObsidian Flavored Markdown Skill
Obsidian风味Markdown使用指南
This skill enables skills-compatible agents to create and edit valid Obsidian Flavored Markdown, including all Obsidian-specific syntax extensions.
本技能支持兼容技能的Agent创建和编辑符合规范的Obsidian风味Markdown,包括所有Obsidian专属的语法扩展。
Overview
概述
Obsidian uses a combination of Markdown flavors:
- CommonMark
- GitHub Flavored Markdown
- LaTeX for math
- Obsidian-specific extensions (wikilinks, callouts, embeds, etc.)
Obsidian结合了多种Markdown变体:
- CommonMark
- GitHub Flavored Markdown
- LaTeX 用于数学公式
- Obsidian专属扩展(维基链接、提示框、嵌入内容等)
Basic Formatting
基础格式
Paragraphs and Line Breaks
段落与换行
markdown
This is a paragraph.
This is another paragraph (blank line between creates separate paragraphs).
For a line break within a paragraph, add two spaces at the end
or use Shift+Enter.markdown
This is a paragraph.
This is another paragraph (blank line between creates separate paragraphs).
For a line break within a paragraph, add two spaces at the end
or use Shift+Enter.Headings
标题
markdown
undefinedmarkdown
undefinedHeading 1
Heading 1
Heading 2
Heading 2
Heading 3
Heading 3
Heading 4
Heading 4
Heading 5
Heading 5
Heading 6
Heading 6
undefinedundefinedText Formatting
文本格式
| Style | Syntax | Example | Output |
|---|---|---|---|
| Bold | | | Bold |
| Italic | | | Italic |
| Bold + Italic | | | Both |
| Strikethrough | | | |
| Highlight | | | ==Highlighted== |
| Inline code | | | |
| 样式 | 语法 | 示例 | 效果 |
|---|---|---|---|
| 粗体 | | | Bold |
| 斜体 | | | Italic |
| 粗斜体 | | | Both |
| 删除线 | | | |
| 高亮 | | | ==Highlighted== |
| 行内代码 | | | |
Escaping Formatting
转义格式符
Use backslash to escape special characters:
markdown
\*This won't be italic\*
\#This won't be a heading
1\. This won't be a list itemCommon characters to escape: , , , , ,
\*\_\#\`\|\~使用反斜杠转义特殊字符:
markdown
\*This won't be italic\*
\#This won't be a heading
1\. This won't be a list item常见需转义的字符:, , , , ,
\*\_\#\`\|\~Internal Links (Wikilinks)
内部链接(维基链接)
Basic Links
基础链接
markdown
[[Note Name]]
[[Note Name.md]]
[[Note Name|Display Text]]markdown
[[Note Name]]
[[Note Name.md]]
[[Note Name|Display Text]]Link to Headings
链接到标题
markdown
[[Note Name#Heading]]
[[Note Name#Heading|Custom Text]]
[[#Heading in same note]]
[[##Search all headings in vault]]markdown
[[Note Name#Heading]]
[[Note Name#Heading|Custom Text]]
[[#Heading in same note]]
[[##Search all headings in vault]]Link to Blocks
链接到块
markdown
[[Note Name#^block-id]]
[[Note Name#^block-id|Custom Text]]Define a block ID by adding at the end of a paragraph:
^block-idmarkdown
This is a paragraph that can be linked to. ^my-block-idFor lists and quotes, add the block ID on a separate line:
markdown
> This is a quote
> With multiple lines
^quote-idmarkdown
[[Note Name#^block-id]]
[[Note Name#^block-id|Custom Text]]在段落末尾添加 来定义块ID:
^block-idmarkdown
This is a paragraph that can be linked to. ^my-block-id对于列表和引用,在单独一行添加块ID:
markdown
> This is a quote
> With multiple lines
^quote-idSearch Links
搜索链接
markdown
[[##heading]] Search for headings containing "heading"
[[^^block]] Search for blocks containing "block"markdown
[[##heading]] 搜索包含“heading”的标题
[[^^block]] 搜索包含“block”的块Markdown-Style Links
Markdown风格链接
markdown
[Display Text](Note%20Name.md)
[Display Text](Note%20Name.md#Heading)
[Display Text](https://example.com)
[Note](obsidian://open?vault=VaultName&file=Note.md)Note: Spaces must be URL-encoded as in Markdown links.
%20markdown
[Display Text](Note%20Name.md)
[Display Text](Note%20Name.md#Heading)
[Display Text](https://example.com)
[Note](obsidian://open?vault=VaultName&file=Note.md)注意:Markdown链接中的空格必须编码为 。
%20Embeds
嵌入内容
Embed Notes
嵌入笔记
markdown
![[Note Name]]
![[Note Name#Heading]]
![[Note Name#^block-id]]markdown
![[Note Name]]
![[Note Name#Heading]]
![[Note Name#^block-id]]Embed Images
嵌入图片
markdown
![[image.png]]
![[image.png|640x480]] Width x Height
![[image.png|300]] Width only (maintains aspect ratio)markdown
![[image.png]]
![[image.png|640x480]] 宽 x 高
![[image.png|300]] 仅设置宽度(保持宽高比)External Images
外部图片
markdown

markdown

Embed Audio
嵌入音频
markdown
![[audio.mp3]]
![[audio.ogg]]markdown
![[audio.mp3]]
![[audio.ogg]]Embed PDF
嵌入PDF
markdown
![[document.pdf]]
![[document.pdf#page=3]]
![[document.pdf#height=400]]markdown
![[document.pdf]]
![[document.pdf#page=3]]
![[document.pdf#height=400]]Embed Lists
嵌入列表
markdown
![[Note#^list-id]]Where the list has been defined with a block ID:
markdown
- Item 1
- Item 2
- Item 3
^list-idmarkdown
![[Note#^list-id]]列表需先定义块ID:
markdown
- Item 1
- Item 2
- Item 3
^list-idEmbed Search Results
嵌入搜索结果
markdown
```query
tag:#project status:done
```markdown
```query
tag:#project status:done
```Callouts
提示框(Callouts)
Basic Callout
基础提示框
markdown
> [!note]
> This is a note callout.
> [!info] Custom Title
> This callout has a custom title.
> [!tip] Title Onlymarkdown
> [!note]
> This is a note callout.
> [!info] Custom Title
> This callout has a custom title.
> [!tip] Title OnlyFoldable Callouts
可折叠提示框
markdown
> [!faq]- Collapsed by default
> This content is hidden until expanded.
> [!faq]+ Expanded by default
> This content is visible but can be collapsed.markdown
> [!faq]- Collapsed by default
> This content is hidden until expanded.
> [!faq]+ Expanded by default
> This content is visible but can be collapsed.Nested Callouts
嵌套提示框
markdown
> [!question] Outer callout
> > [!note] Inner callout
> > Nested contentmarkdown
> [!question] Outer callout
> > [!note] Inner callout
> > Nested contentSupported Callout Types
支持的提示框类型
| Type | Aliases | Description |
|---|---|---|
| - | Blue, pencil icon |
| | Teal, clipboard icon |
| - | Blue, info icon |
| - | Blue, checkbox icon |
| | Cyan, flame icon |
| | Green, checkmark icon |
| | Yellow, question mark |
| | Orange, warning icon |
| | Red, X icon |
| | Red, zap icon |
| - | Red, bug icon |
| - | Purple, list icon |
| | Gray, quote icon |
| 类型 | 别名 | 描述 |
|---|---|---|
| - | 蓝色,铅笔图标 |
| | 蓝绿色,剪贴板图标 |
| - | 蓝色,信息图标 |
| - | 蓝色,复选框图标 |
| | 青色,火焰图标 |
| | 绿色,对勾图标 |
| | 黄色,问号图标 |
| | 橙色,警告图标 |
| | 红色,叉号图标 |
| | 红色,闪电图标 |
| - | 红色,Bug图标 |
| - | 紫色,列表图标 |
| | 灰色,引用图标 |
Custom Callouts (CSS)
自定义提示框(CSS)
css
.callout[data-callout="custom-type"] {
--callout-color: 255, 0, 0;
--callout-icon: lucide-alert-circle;
}css
.callout[data-callout="custom-type"] {
--callout-color: 255, 0, 0;
--callout-icon: lucide-alert-circle;
}Lists
列表
Unordered Lists
无序列表
markdown
- Item 1
- Item 2
- Nested item
- Another nested
- Item 3
* Also works with asterisks
+ Or plus signsmarkdown
- Item 1
- Item 2
- Nested item
- Another nested
- Item 3
* Also works with asterisks
+ Or plus signsOrdered Lists
有序列表
markdown
1. First item
2. Second item
1. Nested numbered
2. Another nested
3. Third item
1) Alternative syntax
2) With parenthesesmarkdown
1. First item
2. Second item
1. Nested numbered
2. Another nested
3. Third item
1) Alternative syntax
2) With parenthesesTask Lists
任务列表
markdown
- [ ] Incomplete task
- [x] Completed task
- [ ] Task with sub-tasks
- [ ] Subtask 1
- [x] Subtask 2markdown
- [ ] Incomplete task
- [x] Completed task
- [ ] Task with sub-tasks
- [ ] Subtask 1
- [x] Subtask 2Quotes
引用
markdown
> This is a blockquote.
> It can span multiple lines.
>
> And include multiple paragraphs.
>
> > Nested quotes work too.markdown
> This is a blockquote.
> It can span multiple lines.
>
> And include multiple paragraphs.
>
> > Nested quotes work too.Code
代码
Inline Code
行内代码
markdown
Use `backticks` for inline code.
Use double backticks for ``code with a ` backtick inside``.markdown
Use `backticks` for inline code.
Use double backticks for ``code with a ` backtick inside``.Code Blocks
代码块
markdown
```
Plain code block
```
```javascript
// Syntax highlighted code block
function hello() {
console.log("Hello, world!");
}
```
```pythonmarkdown
```
Plain code block
```
```javascript
// Syntax highlighted code block
function hello() {
console.log("Hello, world!");
}
```
```pythonPython example
Python example
def greet(name):
print(f"Hello, {name}!")
undefineddef greet(name):
print(f"Hello, {name}!")
undefinedNesting Code Blocks
嵌套代码块
Use more backticks or tildes for the outer block:
markdown
````markdown
Here's how to create a code block:
```js
console.log("Hello")
```
````使用更多反引号或波浪线作为外层分隔符:
markdown
````markdown
Here's how to create a code block:
```js
console.log("Hello")
```
````Tables
表格
markdown
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |markdown
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |Alignment
对齐方式
markdown
| Left | Center | Right |
|:---------|:--------:|---------:|
| Left | Center | Right |markdown
| Left | Center | Right |
|:---------|:--------:|---------:|
| Left | Center | Right |Using Pipes in Tables
在表格中使用竖线
Escape pipes with backslash:
markdown
| Column 1 | Column 2 |
|----------|----------|
| [[Link\|Display]] | ![[Image\|100]] |使用反斜杠转义竖线:
markdown
| Column 1 | Column 2 |
|----------|----------|
| [[Link\|Display]] | ![[Image\|100]] |Math (LaTeX)
数学公式(LaTeX)
Inline Math
行内数学公式
markdown
This is inline math: $e^{i\pi} + 1 = 0$markdown
This is inline math: $e^{i\pi} + 1 = 0$Block Math
块级数学公式
markdown
$$
\begin{vmatrix}
a & b \\
c & d
\end{vmatrix} = ad - bc
$$markdown
$$
\begin{vmatrix}
a & b \\
c & d
\end{vmatrix} = ad - bc
$$Common Math Syntax
常用数学公式语法
markdown
$x^2$ Superscript
$x_i$ Subscript
$\frac{a}{b}$ Fraction
$\sqrt{x}$ Square root
$\sum_{i=1}^{n}$ Summation
$\int_a^b$ Integral
$\alpha, \beta$ Greek lettersmarkdown
$x^2$ 上标
$x_i$ 下标
$\frac{a}{b}$ 分数
$\sqrt{x}$ 平方根
$\sum_{i=1}^{n}$ 求和
$\int_a^b$ 积分
$\alpha, \beta$ 希腊字母Diagrams (Mermaid)
图表(Mermaid)
markdown
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Do this]
B -->|No| D[Do that]
C --> E[End]
D --> E
```markdown
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Do this]
B -->|No| D[Do that]
C --> E[End]
D --> E
```Sequence Diagrams
序列图
markdown
```mermaid
sequenceDiagram
Alice->>Bob: Hello Bob
Bob-->>Alice: Hi Alice
```markdown
```mermaid
sequenceDiagram
Alice->>Bob: Hello Bob
Bob-->>Alice: Hi Alice
```Linking in Diagrams
图表中的链接
markdown
```mermaid
graph TD
A[Biology]
B[Chemistry]
A --> B
class A,B internal-link;
```markdown
```mermaid
graph TD
A[Biology]
B[Chemistry]
A --> B
class A,B internal-link;
```Footnotes
脚注
markdown
This sentence has a footnote[^1].
[^1]: This is the footnote content.
You can also use named footnotes[^note].
[^note]: Named footnotes still appear as numbers.
Inline footnotes are also supported.^[This is an inline footnote.]markdown
This sentence has a footnote[^1].
[^1]: This is the footnote content.
You can also use named footnotes[^note].
[^note]: Named footnotes still appear as numbers.
Inline footnotes are also supported.^[This is an inline footnote.]Comments
注释
markdown
This is visible %%but this is hidden%% text.
%%
This entire block is hidden.
It won't appear in reading view.
%%markdown
This is visible %%but this is hidden%% text.
%%
This entire block is hidden.
It won't appear in reading view.
%%Horizontal Rules
水平线
markdown
---
***
___
- - -
* * *markdown
---
***
___
- - -
* * *Properties (Frontmatter)
属性(前置元数据)
Properties use YAML frontmatter at the start of a note:
yaml
---
title: My Note Title
date: 2024-01-15
tags:
- project
- important
aliases:
- My Note
- Alternative Name
cssclasses:
- custom-class
status: in-progress
rating: 4.5
completed: false
due: 2024-02-01T14:30:00
---属性使用YAML前置元数据,位于笔记开头:
yaml
---
title: My Note Title
date: 2024-01-15
tags:
- project
- important
aliases:
- My Note
- Alternative Name
cssclasses:
- custom-class
status: in-progress
rating: 4.5
completed: false
due: 2024-02-01T14:30:00
---Property Types
属性类型
| Type | Example |
|---|---|
| Text | |
| Number | |
| Checkbox | |
| Date | |
| Date & Time | |
| List | |
| Links | |
| 类型 | 示例 |
|---|---|
| 文本 | |
| 数字 | |
| 复选框 | |
| 日期 | |
| 日期时间 | |
| 列表 | |
| 链接 | |
Default Properties
默认属性
- - Note tags
tags - - Alternative names for the note
aliases - - CSS classes applied to the note
cssclasses
- - 笔记标签
tags - - 笔记的别名
aliases - - 应用于笔记的CSS类
cssclasses
Tags
标签
markdown
#tag
#nested/tag
#tag-with-dashes
#tag_with_underscores
In frontmatter:
---
tags:
- tag1
- nested/tag2
---Tags can contain:
- Letters (any language)
- Numbers (not as first character)
- Underscores
_ - Hyphens
- - Forward slashes (for nesting)
/
markdown
#tag
#nested/tag
#tag-with-dashes
#tag_with_underscores
In frontmatter:
---
tags:
- tag1
- nested/tag2
---标签可包含:
- 字母(任意语言)
- 数字(不能作为首字符)
- 下划线
_ - 连字符
- - 斜杠 (用于嵌套)
/
HTML Content
HTML内容
Obsidian supports HTML within Markdown:
markdown
<div class="custom-container">
<span style="color: red;">Colored text</span>
</div>
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
<kbd>Ctrl</kbd> + <kbd>C</kbd>Obsidian支持在Markdown中嵌入HTML:
markdown
<div class="custom-container">
<span style="color: red;">Colored text</span>
</div>
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
<kbd>Ctrl</kbd> + <kbd>C</kbd>Complete Example
完整示例
markdown
---
title: Project Alpha
date: 2024-01-15
tags:
- project
- active
status: in-progress
priority: high
---markdown
---
title: Project Alpha
date: 2024-01-15
tags:
- project
- active
status: in-progress
priority: high
---Project Alpha
Project Alpha
Overview
概述
This project aims to [[improve workflow]] using modern techniques.
[!important] Key Deadline The first milestone is due on ==January 30th==.
本项目旨在使用现代技术[[提升工作流]]。
[!important] 关键截止日期 第一个里程碑截止日期为 ==1月30日==。
Tasks
任务
- Initial planning
- Resource allocation
- Development phase
- Backend implementation
- Frontend design
- Testing
- Deployment
- 初始规划
- 资源分配
- 开发阶段
- 后端实现
- 前端设计
- 测试
- 部署
Technical Notes
技术说明
The main algorithm uses the formula $O(n \log n)$ for sorting.
python
def process_data(items):
return sorted(items, key=lambda x: x.priority)核心算法使用 $O(n \log n)$ 排序公式。
python
def process_data(items):
return sorted(items, key=lambda x: x.priority)Architecture
架构
mermaid
graph LR
A[Input] --> B[Process]
B --> C[Output]
B --> D[Cache]mermaid
graph LR
A[输入] --> B[处理]
B --> C[输出]
B --> D[缓存]Related Documents
相关文档
- ![[Meeting Notes 2024-01-10#Decisions]]
- [[Budget Allocation|Budget]]
- [[Team Members]]
- ![[2024-01-10会议记录#决策]]
- [[预算分配|预算]]
- [[团队成员]]
References
参考资料
For more details, see the official documentation1.
%%
Internal notes:
- Review with team on Friday
- Consider alternative approaches %%
undefined