0%

Add an RSS Feed to Your Hexo Blog

  1. Install hexo-generator-feed plugin
    1
    npm install hexo-generator-feed
  1. Open your hexo configuration file:

_config.yml, add the following to the bottom:

1
2
3
4
5
6
7
8
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 100
content_limit_delim: ' '
  • type - Feed type. (atom/rss2)
  • path - Feed path. (Default: atom.xml/rss2.xml)
  • limit - Maximum number of posts in the feed (Use 0 or false to show all posts)
  • hub - URL of the PubSubHubbub hubs (Leave it empty if you don’t use it)
  • content - (optional) set to ‘true’ to include the contents of the entire post in the feed.
  • content_limit - (optional) Default length of post content used in summary. Only used, if content setting is false and no custom post description present.
  • content_limit_delim - (optional) If content_limit is used to shorten post contents, only cut at the last occurrence of this delimiter before reaching the character limit. Not used by default.

Reference:

- hexojs/hexo-generator-feed