[Hexo] Use hexo-generator-feed plugin to generate Atom 1.0 or RSS 2.0 feed automatically in Hexo
hexo-generator-feed
Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).
hexo-generator-feed
plugin will generate Atom 1.0 or RSS 2.0 feed files for Hexo
pages, posts, categories, tags.
Installation
Use npm
to install hexo-generator-feed
package.
1 | npm install hexo-generator-feed --save |
Configuration
In the front-matter of your post, you can optionally add a description
, intro
or excerpt
setting to write a summary for the post. Otherwise the summary will default to the excerpt or the first 140 characters of the post.
1 |
|
You can configure this plugin in _config.yml
.
1 | # _config.yml |
Visit Options - https://github.com/hexojs/hexo-generator-feed#options to learn more options.
Finally, you can visit <Your Site Url>/atom.xml
in the browser, and check whether the atom.xml
works correctly after Hexo restarted or regenerated.