返回
Featured image of post Markdown 语法手册

Markdown 语法手册

Markdown是一种轻量级标记语言,创始人为约翰·格鲁伯(英语:John Gruber)

Markdown的轻量化、易读易写特性,并且对于图片,图表、数学式都有支持,Hugo支持使用Markdown来撰写文档。

1. 标题

  • 代码
# H1
## H2
### H3
#### H4
##### H5
###### H6
  • 效果

H1

H2

H3

H4

H5
H6

2. 字体

  • 代码
**粗体**
*斜体*
_斜体_
***粗斜体***
~~删除线~~
  • 效果 粗体
    斜体 斜体 粗斜体 删除线

3. 链接

点击这个[超链接][1]

[1]:https://gohugo.io/

效果 点击这个超链接

4. 段落

Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.

Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.

4. 引用块

The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations.

Tiam, ad mint andaepu dandae nostion secatur sequo quae. Note that you can use Markdown syntax within a blockquote.

Don’t communicate by sharing memory, share memory by communicating.Rob Pike1

5. 表格

Tables aren’t part of the core Markdown spec, but Hugo supports supports them out-of-the-box.

   Name | Age
--------|------
    Bob | 27
  Alice | 23

| Italics   | Bold     | Code   |
| --------  | -------- | ------ |
| *italics* | **bold** | `code` |

效果

Name Age
Bob 27
Alice 23
Italics Bold Code
italics bold code

6. 代码块

使用反钩符号

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Example HTML5 Document</title>
</head>
<body>
  <p>Test</p>
</body>
</html>

使用4个空格

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Example HTML5 Document</title>
</head>
<body>
  <p>Test</p>
</body>
</html>

使用Hugo高亮标签

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Example HTML5 Document</title>
</head>
<body>
  <p>Test</p>
</body>
</html>

列表

数字顺序列表

  1. First item
  2. Second item
  3. Third item

无数字顺序列表

  • List item
  • Another item
  • And another item

嵌套列表

  • Fruit
    • Apple
    • Orange
    • Banana
  • Dairy
    • Milk
    • Cheese

Other Elements — abbr, sub, sup, kbd, mark

GIF is a bitmap image format.

H2O

Xn + Yn = Zn

Press CTRL+ALT+Delete to end the session.

Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures.


  1. The above quote is excerpted from Rob Pike’s talk during Gopherfest, November 18, 2015. ↩︎

Licensed under CC BY-NC-SA 4.0