Butterfly 主题官方中文文档
本地搜索
- 安裝
hexo-generator-search
,格式只支持 xml。
1
| npm install hexo-generator-search --save
|
1 2
| local_search: enable: false
|
副标题打字机效果
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| subtitle: enable: true effect: true loop: true source: 2 sub: - 世界上只有一种英雄主义,就是看清生活的真相之后,依然热爱生活。
|
source 第三方接口的 相关配置参数可以在 ~butterfly\layout\includes\third-party\subtitle.pug
文件中修改
1
| npm install hexo-generator-feed --save
|
1 2 3 4 5
|
social: fas fa-rss: /atom.xml
|
樱花飘落效果
文件准备:樱花飘落效果的 JS 文件
1 2
| if theme.sakura.enable script(src="/js/sakura.js")
|
字数统计
1
| npm install hexo-wordcount --save
|
1 2 3 4 5 6
| wordcount: enable: true post_wordcount: true min2read: true total_wordcount: true
|
生成唯一文章链接
1
| npm install hexo-abbrlink --save
|
1 2 3 4 5
| permalink: posts/:abbrlink.html
abbrlink: alg: crc32 rep: hex
|
生成的链接将如下所示
crc16 & hex
https://post.zz173.com/posts/66c8.html
crc16 & dec
https://post.zz173.com/posts/65535.html
crc32 & hex
https://post.zz173.com/posts/8ddf18fb.html
crc32 & dec
https://post.zz173.com/posts/1690090958.html
生成文章目录
Hexo 默认不支持目录显示,可以安装需要的插件
1
| npm install hexo-toc --save
|
1 2 3 4 5 6 7 8 9
| toc: maxdepth: 3 class: toc slugify: transliteration decodeEntities: false anchor: position: after symbol: '#' style: header-anchor
|