hexo+butterfly博客的一些配置总结
添加RSS
npm install hexo-generator-feed --save
在_config.yml
里添加:
feed:
enable: true
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content_limit_delim: ' '
order_by: -date
icon: icon.png
autodiscovery: true
template:
其中limit
指源里保存的文章个数,content_limit
指summary的长度。
如果想要添加RSS图标,可在butterfly
主题配置文件_config.yml
里,social:
后添加fas fa-rss: /atom.xml || RSS || '#f26522'
,这样RSS图标就会出现在右边头像下边
添加sitemap
npm install hexo-generator-sitemap --save
根目录_config.yml
里添加:
plugin:
- hexo-generator-feed
- hexo-generator-sitemap
配置成功标志:generate后生成sitemap.xml
添加本地搜索
npm install hexo-generator-search --save
我用的butterfly
主题,直接在主题配置文件里更改:
# Local search
local_search:
enable: true
# Preload the search data when the page loads.
preload: false
# Show top n results per article, show all results by setting to -1
top_n_per_article: 1
# Unescape html strings to the readable one.
unescape: false
CDN:
webhook
在此贴出参考博客here