概述
Markdown 是一种易于读写的轻量级标记语言,可用于在纯文本文档中添加格式化元素,特别适用于简单文档结构的内容编写,配合 Typora 等实时预览编辑器,可以大幅提高内容输出效率。
本文 Markdown 语法参考自 Github 官方文档编写说明: 基本撰写和格式语法 ,因 Markdown 应用程序实现存在差异,部分语法可能不兼容,具体以支持 Markdown 语法为准。
标题
使用 #
标记,可以表示 1 - 6
级标题,等同于 HTML
中的 h1 - h6
标签。
markdown
# 一级标题
markdown
## 二级标题
markdown
### 三级标题
markdown
#### 四级标题
markdown
##### 五级标题
markdown
###### 六级标题
引用
markdown
> 引用一段内容
列表
markdown
- 第一行内容
- 第二行内容
- 第三行内容
markdown
1. 第一行内容
2. 第二行内容
3. 第三行内容
表格
markdown
| Tables | Are | Cool |
| ------------- | ------------- | ----- |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
markdown
| Tables | Are | Cool |
| :------------ | :------------ | :---- |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
markdown
| Tables | Are | Cool |
| :-----------: | :-----------: | :---: |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
markdown
| Tables | Are | Cool |
| ------------: | ------------: | ----: |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
图片
markdown
![icon](https://dodoo.co/logo.svg)
链接引用
markdown
[nil's blog](https://dodoo.co)
水平分割线
markdown
---
文本格式
markdown
**粗体文本**
__粗体文本__
markdown
*斜体文本*
_斜体文本_
markdown
<u>下划线</u>
markdown
~~删除线~~
警告框
markdown
> [!NOTE]
> 强调用户在快速浏览文档时也不应忽略的重要信息。
markdown
> [!TIP]
> 有助于用户更顺利达成目标的建议性信息。
markdown
> [!IMPORTANT]
> 对用户达成目标至关重要的信息。
markdown
> [!WARNING]
> 因为可能存在风险,所以需要用户立即关注的关键内容。
markdown
> [!CAUTION]
> 行为可能带来的负面影响。
代码块
markdown
``` sh
echo 'hello world !'
```
LaTex 公式
markdown
```
```
图表支持
markdown
```
```
Emoji 表情
更多 emoji 表情参考:markdown-it 支持 emoji 列表
markdown
:100: -> 💯
脚注
markdown
创建脚注:[^Github]
[^Github]: Github 是全球最大的同性社交平台 !^Github]