MARKDOWN使用技巧

Markdown使用技巧

代码插入

1
2
3
4
5
```javascript
$(document).ready(function () {
alert('RUNOOB');
});
```

生成目录的方式

只需在文章开头添加[TOC]即可 Table Of Contents

快捷键

https://support.typora.io/Shortcut-Keys/#change-shortcut-keys

  • Ctrl/Command + Z
  • 增加删除缩进 ctrl+[ ctrl+]

图标插入

1
2
3
4
5
6
7
8
9
10
11
12
13
14
```mermaid

graph LR
A[青柠学术]-->B[博主]
A-->C[Up主]
A-->D[社群]
B-->E[公众号]
B-->F[知乎]
C-->H[B站]
C-->I[荔枝微课]
D-->J[知识星球]
D-->K[微信群]

```

Markdown 脚注

尽管标准 Markdown 不支持脚注,但很多 Markdown 变种都支持。一般来说,大多数 Markdown 方言和编辑器支持行内脚注和引用式脚注这两种方式,而后者使用更为普遍:

Here is a footnote reference,[^1] and another.[^longnote]

[^1]: Here is the footnote.

[^longnote]: Here’s one with multiple blocks.

1
2
3
4
5
Here is a footnote reference,[^1] and another.[^longnote]

[^1]: Here is the footnote.

[^longnote]: Here's one with multiple blocks.

使用相对较少的行内脚注的书写方式:

1
2
3
Here is an inline note.^[Inline notes are easier to write, since
you don't have to pick an identifier and move down to type the
note.]

Markdown 引用式链接

这种广泛使用的链接写作方式被称为行内链接(inline link)。实际上,Markdown 中的链接还有另一种不太常用的写法,即引用式链接(reference-style link),它的形式如下:

This is an example reference-style link.

1
2
3
This is [an example] [id] reference-style link.

[id]: http://example.com/ "Optional Title Here"

可以发现,引用式链接在正文中使用了两个方括号,第一个方括号包裹超链接的文本部分,也就是这里的 [an example],紧接着其后的是一个可有可无的空格,接下来使用第二个方括号包裹该链接的标识符,这里用 [id] 表示。