发布前提
1 | --- |
文章置顶
1.你要在文章的front-matter区域里添加top: True属性来放入这篇文章置顶。
2.你可以参考hexo-generator-index-pin-top这个仓库来了解更多细节。
举个例子:
你的某篇文章开头如下:
1 | title: xxxx |
现在把top: True加进去:
1 | title: xxxx |
文章隐藏
1.如果想要隐藏文章,可以在文章的Front-matter添加
1 | hide: true |
为特定的文章配置是否显示TOC和特定的目录章节数字
你在文章的md文件的头部,加入toc_number状语从句:toc项,配置并true或者false即可。
toc是否显示文章TOC
toc_number 是否显示章节数
配置之后你的特定的文章将会拥有它自己的目录数字的显示与否,而不会受累的配置影响。
外挂标签
标签外挂是Hexo独有的功能,并非标准的Markdown格式
用法
1 | {% note [class] [no-icon] %} |
例如:
1 | {% note default %} |
版权
转载文章不需要显示版权
1 | copyright: false |
画廊相册图库
一个图库集合。
写法
1 | <div class="gallery-group-main"> |
name:图库名字
description:图库描述
link:连接到对应相册的地址
img-url:图库封面的地址
例如:
1
2
3
4
5<div class="gallery-group-main">
{% galleryGroup '壁紙' '收藏的一些壁紙' '/Gallery/wallpaper' https://i.loli.net/2019/11/10/T7Mu8Aod3egmC4Q.png %}
{% galleryGroup '漫威' '關於漫威的圖片' '/Gallery/marvel' https://i.loli.net/2019/12/25/8t97aVlp4hgyBGu.jpg %}
{% galleryGroup 'OH MY GIRL' '關於OH MY GIRL的圖片' '/Gallery/ohmygirl' https://i.loli.net/2019/12/25/hOqbQ3BIwa6KWpo.jpg %}
</div>
画廊相册
写法:
1 | {% gallery %} |
例如:
1 | {% gallery %} |
# 隐藏标签
如果你想把一些文字,内容隐藏起来,并提供按钮让用户点击显示。可以使用这个标签外挂。
写法:
inline 在文本里面添加按钮隐藏内容,只限文字
(content不能包含当引号,可用')
1 | {% hideInline content,display,bg,color %} |
content:文本内容
display:按钮显示的文字(任选)
bg:按钮的背景颜色(任选)
color:按钮文字的颜色(任选)
block独立的block隐藏内容,可以隐藏很多内容,包括图片,代码块等等
1
2
3{% hideBlock display,bg,color %}
content
{% endhideBlock %}content:文本内容
display:按钮显示的文字(任选)
bg:按钮的背景颜色(任选)
color:按钮文字的颜色(任选)
例如:inline
1
2
3哪個英文字母最酷? {% hideInline 因為西裝褲(C裝酷),查看答案,#FF7242,#fff %}
門裏站着一個人? {% hideInline 閃 %}例如:block
1
2
3
4
5
6
7
8
9
10
11
12{% hideBlock 查看答案 %}
{% gallery %}








{% endgallery %}
{% endhideBlock %}
steam游戏
使用方法
- 嵌入单个游戏
1
{% steamgame appid description %}
- 批量嵌入游戏
1
2
3
4
5
6
7
8{% steamgames %}
appid
appid
appid
appid
appid
appid
{% endsteamgames %}参数
appid: Steam 游戏 id.
description(可选): 用于替换默认游戏简介。Demo
1
{% steamgame 1057090 %}
1
{% steamgame 1057090 "I like it." %}
1
2
3
4{% steamgames %}
261570
1057090
{% endsteamgames %}License
MIT
播放器
使用
标签参数
- title : 曲目标题
- author: 曲目作者
- url: 音乐文件 URL 地址
- picture_url: (可选) 音乐对应的图片地址
- narrow: (可选)播放器袖珍风格
- autoplay: (可选) 自动播放,移动端浏览器暂时不支持此功能
- width:xxx: (可选) 播放器宽度 (默认: 100%)
- lrc:xxx: (可选)歌词文件 URL 地址
1 | {% aplayer "寻" "华晨宇" "https://link.hhtjim.com/163/472137749.mp3" "/music/xun.png" %} |
1 | {% meting "2802022828" "netease" "playlist" "autoplay" "mutex:false" "listmaxheight:340px" "preload:none" "theme:#ad7a86"%} |