RSS & JSON Feed
Publish collections as RSS 2.0 and JSON Feed 1.1, per collection or combined site-wide, with automatic discovery tags.
Overview
Any collection can publish its entries as a feed in RSS 2.0 and JSON Feed 1.1 formats. Every feed-enabled collection is also included in one site-wide combined feed. Feeds are generated automatically from your published entries, so you don't need a template.
Quick start
- Open the collection in the dashboard (or use the MCP tool
collections_save). - Turn on
feed_enabled. - Set a
feed_path, such asblog, if you want a feed for this collection alone. - Visit
https://yoursite.com/blog/feed.xmlorhttps://yoursite.com/feed.xml.
Feed URLs
Combined site feed
This feed includes entries from every collection with feed_enabled turned on, whether or not the collection has a feed_path.
| URL | Format |
|---|---|
/feed.xml | RSS 2.0 |
/feed.rss | RSS 2.0 (same as /feed.xml) |
/feed.json | JSON Feed 1.1 |
Per-collection feed
These feeds are available only when the collection has feed_enabled turned on and a feed_path set.
| URL | Format |
|---|---|
/<feed_path>/feed.xml | RSS 2.0 |
/<feed_path>/feed.rss | RSS 2.0 |
/<feed_path>/feed.json | JSON Feed 1.1 |
A feed_path must be one URL segment with no slashes. blog works, but news/updates never resolves.
Collection settings
| Attribute | Type | Default | Description |
|---|---|---|---|
feed_enabled | boolean | false | Includes the collection in the combined feed and turns on its own feed if feed_path is set. |
feed_path | string | none | A single URL segment for the collection's own feed, e.g. blog gives /blog/feed.xml. |
feed_title | string | Collection name | The channel title of the collection's feed. |
feed_description | string | none | The channel description. Left out of the feed when blank. |
feed_limit | integer | 20 | The maximum number of items in the collection's feed. |
Setting feed options
- Dashboard: edit the collection and fill in the feed settings.
- MCP:
collections_saveacceptsfeed_enabled,feed_path,feed_title,feed_descriptionandfeed_limit. Pass an empty string to clearfeed_path,feed_titleorfeed_description. - REST API: the
feed_*attributes appear in collection responses but are read-only there. Change them in the dashboard or over MCP.
{
"account_id": "acct_XXXXXXXX",
"handle": "posts",
"feed_enabled": true,
"feed_path": "blog",
"feed_title": "Acme Blog",
"feed_description": "News and updates from Acme",
"feed_limit": 30
}
What each item contains
A feed includes only published entries that have a page URL.
| Item data | Source |
|---|---|
| Title | The entry title |
| Link / ID | The entry's full URL on the domain the feed was requested from |
| Date | published_at, or the creation date if that's empty. JSON Feed also includes date_modified. |
| Summary | The entry's SEO description: the seo_description field, or else the first of excerpt, summary or meta_description that has a value |
| Full content | The first Rich Text field, or the first Raw HTML field if the entry has no Rich Text |
| Category / tag | The collection name |
Ordering and size
- Per-collection feeds follow the collection's
orderablesetting. Withno, the newestpublished_atcomes first. Withascendingordescending, entries sort bypositionfirst and then bypublished_at. The feed holds at mostfeed_limititems. - The combined feed always puts the newest entries first, across all collections. Its size is the largest
feed_limitof any feed-enabled collection, up to a maximum of 50. - The combined feed uses your account name as its title. The feed language is
en.
Feed discovery
When at least one collection has feeds turned on, {{ content_for_header }} adds <link rel="alternate"> tags to every entry page and index page. These tags let browsers and feed readers find your feeds.
<link rel="alternate" type="application/rss+xml" title="Acme RSS Feed" href="https://acme.com/feed.xml" />
<link rel="alternate" type="application/feed+json" title="Acme JSON Feed" href="https://acme.com/feed.json" />
<link rel="alternate" type="application/rss+xml" title="Acme Blog RSS Feed" href="https://acme.com/blog/feed.xml" />
<link rel="alternate" type="application/feed+json" title="Acme Blog JSON Feed" href="https://acme.com/blog/feed.json" />
The combined-feed links are always added. Per-collection links are added only for collections that have a feed_path. To get these tags, make sure your layout outputs {{ content_for_header }} inside <head> (see Liquid Templates).
Notes
- Feed URLs can't be taken over by a redirect rule.
feed.xml,feed.rssandfeed.jsonare reserved paths. - If a per-collection feed URL doesn't match any feed-enabled collection, it returns 404 (or follows a matching redirect rule).
Related
- Collections
- Routing: entry URLs and ordering
- Collections API