Contents:
{:.no_toc}
* Will be replaced with the ToC, excluding the “Contents” header
{:toc}
TOC
如果想让一篇文章(即post)生成TOC,可以在最开始添加:
# Contents:
{:.no_toc}
* Will be replaced with the ToC, excluding the "Contents" header
{:toc}
效果见本文开头。 说明:*后面可以是任意字符(除了中文)。如果想让某一标题不出现在TOC中,可以在该标题下一行添加{:.no_toc},比如此例中的标题一“Contents:”。
另外,你也可以以如下方式添加:
* Contents" header
{:toc}
效果相信你懂的。
表格
简单版
用一个管道字符|开始一个表行。
代码:
| A simple | table |
| with multiple | lines|
效果:
| A simple | table |
| with multiple | lines|
带表头版
代码:
| Header1 | Header2 | Header3 |
|:--------|:-------:|--------:|
| cell1 | cell2 | cell3 |
| cell4 | cell5 | cell6 |
|-
| cell1 | cell2 | cell3 |
| cell4 | cell5 | cell6 |
|=
| Foot1 | Foot2 | Foot3
{: rules="groups"}
效果:
Header1 | Header2 | Header3 |
---|---|---|
cell1 | cell2 | cell3 |
cell4 | cell5 | cell6 |
- | ||
cell1 | cell2 | cell3 |
cell4 | cell5 | cell6 |
= | ||
Foot1 | Foot2 | Foot3 |
{: rules=”groups”}
说明: |:--- |:--- :|--- :|
前面是表头,冒号代表对齐方向 |-
是隔板线 |=
后面代表表脚
Tips:可以利用全角下的空格来控制间距使得表格更美观
注释
代码:
This is a paragraph
{::comment}
This is a comment which is
completely ignored.
{:/comment}
... paragraph continues here.
Extensions can also be used
inline {::nomarkdown}**see**{:/}!
效果:
This is a paragraph
{::comment}
This is a comment which is
completely ignored.
{:/comment}
… paragraph continues here.
Extensions can also be used
inline {::nomarkdown}see{:/}!
脚注
代码:
This is a text with a
footnote[^1].
[^1]: And here is the definition.
效果:
This is a text with a
footnote1.
缩写
代码:
This is an HTML example.
*[HTML]: Hyper Text Markup Language
效果:
This is an HTML example.
*[HTML]: Hyper Text Markup Language
内联属性
代码:
This is *red*{: style="color: red"}.
效果:
This is red{: style=”color: red”}.