hexo+butterfly博客的一些配置总结

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值