Markdown是一种可以使用普通文本编辑器编写的标记语言,通过简单的标记语法,它可以使普通文本内容具有一定的格式。
hexo默认支持Markdown编辑文章,学习好Markdown 编辑器语法有利于更方便友好的写作;下面我会用一些事例分享Markdown 编辑器使用中的各种技巧。
段首缩进
在文章编辑排版中首先经常使用到的就是段首缩进;那可以看到我的大标题是有缩进使用技巧非常简单就是在段道输入如下代码
下面用菜根谭中一段做例>
好丑心太明,则物不契;贤愚心太明,则人不亲。士君子须是内精明而外浑厚,使好丑两得其平,贤愚共受其益,才是生成的德量。
标题
标题我在之前的文章中己有教程,具体可以跳转hexo开启Mathjax语法渲染配置折腾记这里查看。
文本局中
在诗词歌曲中使用局中显示,可以更好的显示诗词的排版,看起来更加工整。
1
2
3
4
5
6
| {% cq %}
夜宿山寺
唐 · 李白
危楼高百尺,手可摘星辰。
不敢高声语,恐惊天上人。
{% endcq %}
|
下面用唐诗一首演示
{% cq %}
夜宿山寺
唐 · 李白
危楼高百尺,手可摘星辰。
不敢高声语,恐惊天上人。
{% endcq %}
插入图片
可以插入网络中和本的的图片
美女图片镇楼

分页显示
哦😊到这里应该要分页了
代码如下
1
| <escape><!-- more --></escape>
|
链接
- 文字链接
1
| [github](www.github.com)
|
github
- 网址链接
<www.Google.hk>
插入音乐
- 安装
在blog文件夹下安装hexo-tag-aplayer插件
1
| npm install --save hexo-tag-aplayer
|
- 使用
代码如下
1
| {% aplayer "飘向北方" "黄明志,王力宏" "http://music.163.com/song/media/outer/url?id=461864856.mp3" "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559501443630&di=5d355fdbb782fb5bc06c476af70ba19a&imgtype=0&src=http%3A%2F%2Fsource.upupoo.com%2Ftheme%2F1800037383%2FpreviewFix.jpg" "lrc:lrc.txt" %}
|
由于新版本aplayer插件异常放弃
插入视频
- 安装
1
| npm install --save hexo-tag-dplayer
|
- 使用
输入 如下代码
1
| {% dplayer "url=https://vodkgeyttp8.vod.126.net/cloudmusic/YCEhICAiIWI1ISAxMSEiMA==/mv/5617127/36fb72932c6a0682fe09f201e2fdda0b.mp4?wsSecret=bd2a79912d92c40a0557933e82a43f57&wsTime=1562298067" "pic=http://p1.music.126.net/xrLKWowydpr7W_g8YgKBRQ==/18730180580875994.jpg" "loop=yes" "theme=#FADFA3" "autoplay=false" "token=tokendemo" %}
|
**>新版本异常放弃使用dplayer
表格
1
2
3
| | 姓名 | 性别 | 电话 |
| :--- | :----: | ----: |
| 张三 | 男 | 123456789123 |
|
图片墙
1
2
3
4
5
6
| {% gp 4-4 %}




{% endgp %}
|
{% gp 4-4 %}




{% endgp %}
流程图
1
2
3
4
5
6
| {% mermaid graph TD %}
A-->B;
A-->C;
B-->D;
C-->D;
{% endmermaid %}
|
{% mermaid graph TD %}
A–>B;
A–>C;
B–>D;
C–>D;
{% endmermaid %}
1
2
3
4
5
6
7
| {% mermaid graph TD %}
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me thinksssss<br/>ssssssssssssssssssssss<br/>sssssssssssssssssssssssssss}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
{% endmermaid %}
|
{% mermaid graph TD %}
A[Christmas] –>|Get money| B(Go shopping)
B –> C{Let me thinksssss
ssssssssssssssssssssss
sssssssssssssssssssssssssss}
C –>|One| D[Laptop]
C –>|Two| E[iPhone]
C –>|Three| F[Car]
{% endmermaid %}
按钮
{% button #, 开始 %}
1
| {% btn #, Text %} {% btn #, 取消,, Title %}
|
{% btn #, 确定 %} {% btn #, 取消,, Title %}
标签
1
2
3
4
5
| Lorem {% label @ipsum %} {% label primary@dolor sit %} amet, consectetur {% label success@adipiscing elit, %} sed {% label info@do eiusmod %} tempor incididunt ut labore et dolore magna aliqua.
Ut enim *{% label warning @ad %}* minim veniam, quis **{% label danger@nostrud %}** exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate ~~{% label default @velit %}~~ <mark>esse</mark> cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
Lorem {% label @ipsum %} {% label primary@dolor sit %} amet, consectetur {% label success@adipiscing elit, %} sed {% label info@do eiusmod %} tempor incididunt ut labore et dolore magna aliqua.
Ut enim {% label warning @ad %} minim veniam, quis {% label danger@nostrud %} exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate {% label default @velit %} esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
标注
1
2
3
4
| {% note primary %}
#### Primary Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}
|
{% note primary %}
Welcome to Hexo!
{% endnote %}