# hexo-generator-feed: Atom and RSS output from a Hexo blog

> This is the Hexo plugin that turns a blog's posts into an Atom 1.0 or RSS 2.0 feed, with control over summary length, item limit, ordering and autodiscovery. Version 4.0.0 landed in February 2026 with a rewritten feed serializer, while the version compatibility table in the documentation still describes the older release lines.

**hexojs/hexo-generator-feed** — Feed generator for Hexo.

- Repository: https://github.com/hexojs/hexo-generator-feed
- Website: http://hexo.io
- Stars: 596 · Forks: 115
- Language: JavaScript
- License: MIT
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/hexojs-hexo-generator-feed

## A small plugin with a version table that has not caught up

hexo-generator-feed is a Hexo plugin, and the whole job is to generate an Atom 1.0 or an RSS 2.0 feed for a blog. It is one of the pieces the Hexo ecosystem is built from, and it lives in the hexojs organisation with the site documentation on hexo.io. Installing it is a single command:
```bash
npm install hexo-generator-feed --save
```
The interesting wrinkle is in the version compatibility list that follows the install command, because it maps Hexo releases to plugin lines: Hexo 4 and later take the 2.x series, Hexo 3 takes 1.x, and Hexo 2 takes 0.x. The current published release is v4.0.0, dated 2026-02-08, and the documentation in the repository still describes the older mapping. That does not mean the new release is broken, but it does mean the compatibility table in the documentation is a place where you should not take the text at face value, and the release history in the package registry is the better guide to what changed.

## One configuration block controls the feed

Everything is set in the site configuration file `_config.yml`, under a `feed` key, and the documented default block is a useful starting point:
```yaml
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
```
The `enable` switch turns the plugin on and is enabled by default, so installing the package is often enough to get a feed. The `limit` is the maximum number of posts in the feed, and setting it to `0` or `false` includes every post, which is the setting to reach for when you want a complete archive feed rather than a rolling window. The `order_by` key decides the order of items and defaults to `-date`, newest first.

## The summary is the excerpt, or 140 characters

What readers see in a feed reader is decided by a short chain of rules, and the plugin gives you three ways to override it. In the front-matter of a post you can add a `description`, an `intro` or an `excerpt` setting to write the summary yourself. If none of those is present, the summary falls back to the excerpt of the post, and if there is no excerpt either, to the first 140 characters of the post. The `content_limit` option sets the length used for that automatic summary, and it only applies when `content` is false and no custom description is present, so turning on full content makes the length setting irrelevant. That is a detail worth knowing, because a site that expects a 200 character summary will silently get the whole post once `content` is set to true.

## Generating both formats at once

The `type` key accepts a single value, `atom` or `rss2`, and it also accepts a list, in which case both feeds are written. The `path` key then has to follow the same order as the `type` list, which is the one real footgun in the configuration:
```yaml
feed:
  # Generate atom feed
  type: atom

  # Generate both atom and rss2 feeds
  type:
    - atom
    - rss2
  path:
    - atom.xml
    - rss2.xml
```
The default paths follow the same convention, atom.xml and rss2.xml. The reason to emit both is subscriber compatibility, since older feed readers still expect RSS 2 while Atom is the better format for newer clients, and a site with an existing audience is usually better off not changing the format it already publishes.

Two other options control how much content is published. Setting `content` to true includes the contents of the entire post in the feed, and `content_limit_delim` decides where a shortened post may be cut, since the documentation states that when it is used the cut only happens at the last occurrence of that delimiter before the character limit. It is not used by default.

## Hubs, icons and autodiscovery

Three options are worth a second look because they affect the wider publishing setup. The `hub` key takes the URL of a PubSubHubbub hub and is left empty if you do not use one, which lets a hub push updates to subscribers rather than waiting for them to poll. The `icon` key sets a custom feed icon, and when it is not set the icon defaults to a gravatar of the email address given in the main configuration. The `autodiscovery` option adds the standard autodiscovery link so browsers and readers can find the feed from the site itself, and it is enabled by default. The documentation notes the catch that many themes already offer this feature, so you may need to adjust the theme configuration as well if you want to turn it off, which means the plugin is not the only place that decides whether your feed is discoverable.

## What changed in 4.0.0

The current release is a rewrite of the feed handling rather than a feature addition, and the dependency list shows it. The plugin now depends on feedsmith at version 3.0.0-rc.1 for producing the feed output and on hexo-util 4.0.0, and the development dependencies pin Hexo 8.1.2, mocha 11.7.5, chai 6.2.2, cheerio 1.2.0, camaro 6.5.0, eslint 10.6.0 and nyc for coverage. The package manifest requires Node 20.19.0 or newer, which is a jump for anyone on an older Node in CI, and the feed library is pinned to a release candidate, so a site that treats its dependency tree as stable will want to pin this plugin accordingly.

The tests run through mocha on a single test entry point, with nyc collecting coverage, and linting is handled by eslint with the shared hexo config. The repository itself is small, with an `index.js` entry point, a `lib/` directory, a `test/` directory and a flat eslint config, which is what you would expect from a plugin with one job. The licence is MIT, and the last push was on 2026-08-07, with the tagged releases being v4.0.0 on 2026-02-08, 3.0.0 on 2020-08-09 and 2.2.0 on 2019-11-27.

## Conclusion

The plugin suits a Hexo site that publishes a feed, because the summary rules, the ordering and the limit are all configurable in one block of the site configuration and the output is either Atom, RSS 2, or both. It is the wrong choice if you only need one feed on a site whose theme already generates one, since the autodiscovery link may then be duplicated and the documentation notes you may need to adjust the theme configuration. It is also the wrong choice to install blindly on a modern Node setup without reading the requirements, because 4.0.0 requires Node 20.19.0 or newer and pulls in a release candidate of the feed library. Before upgrading, check the compatibility table against the version line you are on, since the documentation still maps Hexo 4 and later to the 2.x series while the current release is 4.0.0, and confirm which post summary your readers will see before you publish.

## FAQ

### How do I install the Hexo feed generator?

Run npm install hexo-generator-feed --save in your Hexo site. The plugin is enabled by default, so a feed appears once it is installed and the site is regenerated.

### How do I control the summary shown in the feed?

Add a description, intro or excerpt setting to a post's front-matter to write the summary yourself. Otherwise the summary defaults to the post excerpt, or to the first 140 characters, and the content_limit option adjusts that automatic length.

### Can I generate both an Atom and an RSS feed?

Yes. Set the type option to a list of atom and rss2, and give a matching list of paths in the same order, for example atom.xml and rss2.xml. The path list has to follow the order of the type list.

### How do I include the full text of each post in the feed?

Set the content option to true in the feed configuration. The content_limit setting only applies when content is false and the post has no custom description.

### Which Node version does the current release need?

The package manifest requires Node 20.19.0 or newer. Version 4.0.0 also depends on feedsmith 3.0.0-rc.1 and hexo-util 4.0.0, and the last push to the repository was on 2026-08-07.

## Sources

- [hexojs/hexo-generator-feed on GitHub](https://github.com/hexojs/hexo-generator-feed)
- [License: MIT](https://github.com/hexojs/hexo-generator-feed/blob/master/LICENSE)
- [Project website](http://hexo.io)
- [README](https://github.com/hexojs/hexo-generator-feed/blob/master/README.md)
- [Releases](https://github.com/hexojs/hexo-generator-feed/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/hexojs-hexo-generator-feed
