给hexo 网站加上RSS订阅功能

image.png

hexo RSS插件GitHub地址

https://github.com/hexojs/hexo-generator-feed

如何在hexo 配置 rss

1、首先添加插件,在hexo根目录下执行

1
2
npm install --save hexo-generator-feed

2、配置_config.yml文件,启用插件

1
2
3
4
5
6
7
8
# Extensions
plugins:
hexo-generator-feed
#Feed Atom
feed:
type: atom
path: atom.xml
limit: 20

hexo中生成RSS xml文件

1
hexo g

在public目录中可以看到 atom.xml 这就是生成的RSS文件

通过 RSS文件可以实现对于网站内容的订阅