Hexo Butterfly 主题文章置顶

卸载 hexo-generator-index,然后安装 hexo-generator-index-pin-top

npm uninstall hexo-generator-index --save
npm install hexo-generator-index-pin-top --save

使用方法:

在需要置顶的文章的 Front-matter 中加上 top: true / 数字即可,

数字越大,文章越靠前。

例如

cover: 
top: 1 #这里加一个top就行
abbrlink: 1d5436e1
date: 2023-01-06 17:32:05

本文引用自:https://blog.aiheadn.cn/archives/1b4c065d.html

Hexo Butterfly主题首页增加字数总计&阅读时间

开启字数统计功能,需要安装hexo-wordcount插件

在 hexo 工作目录下运行npm install hexo-wordcount --saveor yarn add hexo-wordcount

# Need to install the hexo-wordcount plugin
wordcount:
enable: true
# Display the word count of the article in post meta
post_wordcount: true
# Display the time to read the article in post meta
min2read: true
# Display the total word count of the website in aside's webinfo
total_wordcount: true
参数 解释
post_wordcount 在文章页面显示字数
min2read 在文章页面显示阅读时间
total_wordcount 在侧边栏显示网站总字数