Feed generator for Hexo.
Generate Atom 1.0 or RSS 2.0 feed.
npm install hexo-generator-feed --save
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.
You can configure this plugin in _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:
atom
or rss2
. Specify ['atom', 'rss2']
to output both types. (Default: atom
)
feed:
# Generate atom feed
type: atom
# Generate both atom and rss2 feeds
type:
- atom
- rss2
path:
- atom.xml
- rss2.xml
0
or false
to show all posts)true
)
# (Optional) Exclude custom template from being copied into public/ folder
# Alternatively, you could also prepend an underscore to its filename, e.g. _custom.xml
# https://hexo.io/docs/configuration#Include-Exclude-Files-or-Folders
exclude:
- 'custom.xml'
feed:
type:
- atom
- rss2
template:
- ./source/custom.xml
# atom will be generated using custom.xml
# rss2 will be generated using the default template instead