Blog feeds
v0.0.3
The Mishka Blog serves RSS 2.0, Atom 1.0 and JSON Feed 1.1 feeds of a site's newest posts, and of a category, a tag or a blogger. This page lists their addresses, what a feed holds, how it is kept and the settings that control it. Nothing needs setting up: every site that has the blog set up serves its feeds.
Addresses
The feed of the whole site:
| Address | Format |
|---|---|
/feed, /feed.rss | RSS 2.0 |
/feed/atom | Atom 1.0 |
/feed.json | JSON Feed 1.1 |
The feed of a category, a tag or a blogger is at /feed/<kind>/<key>, which is RSS. Add /atom or /json after it for the other formats. The kind is category, tag or author, and the key is the slug.
/feed/category/elixiris the RSS feed of the category with the slugelixir./feed/tag/elixir/atomis the Atom feed of the tag./feed/author/ada/jsonis the JSON feed of the blogger with the slugada.- A category under another category is also at its whole chain,
/feed/category/design/accessibility. Its last segment alone works too.
Every address also exists under a language, /fa/feed for example. A feed without a prefix is in the site's primary language, and a prefix must be a language the site has. A feed lists the posts in its language.
What a feed holds
- The newest posts a visitor who is not signed in may open. A draft, a scheduled post, an archived post, a post locked to a permission and a post filed only under a locked category are never in a feed.
- Each entry links to the post at the address of the site's post page. A post that address cannot be made for is left out.
- An entry's authors, categories and the post's text as the site draws it. The summary is the post's excerpt, or the first 300 characters of its text. The HTML goes in a CDATA section, and characters that XML 1.0 forbids are taken out.
- The feed's title is the site's, with the term's name after it for a category, a tag or a blogger. Its link is the blog's front page, or the term's page.
Settings
Under Settings, Blog, in the Feeds group. Each has a global default that a site may override.
| Setting | Key | Default | What it does |
|---|---|---|---|
| Serve RSS, Atom and JSON feeds | blog.feeds.enabled | On | Off, every feed of the site answers 404 and the site's pages name none. |
| Posts in a feed | blog.feeds.items | 20 | How many of the newest posts a feed lists, from 1 to 100. |
| Put the whole post in a feed | blog.feeds.full_content | On | Off, a feed lists only each post's title and summary, so a reader visits the site to read it. |
How a feed is answered and kept
- The content type is
application/rss+xml,application/atom+xmlorapplication/feed+json, withcharset=utf-8. - A feed carries a content hash
ETagand the newest post'slast-modified, and answers304to a request whoseif-none-matchnames theETag. It is sent withcache-control: public, max-age=300, with no session cookie, and withx-robots-tag: noindexto keep it out of search results. - The blog builds a feed once and keeps it for five minutes. A write to a post, a category, a tag or a blogger drops the site's kept feeds, and the next request builds them again.
- A site whose feeds are off, a language the site does not have, an address that is not plausible, and a term the site does not have answer
404with the plain textNot Found, which no cache keeps.
Where readers find them
- The head of every page of the site names the RSS, Atom and JSON feeds in the page's language, so a feed reader finds them from any page. A category's, a tag's or a blogger's page also names that term's feeds. A site with the blog switched off or its feeds off names none.
blog-post-listdraws an RSS link beside its sort button, to the feed of what it shows.blog-post-detaildraws one in the line under the title. Setshow_feedoff to hide it, andfeed_textto change its words. A site set up on an earlier version takes these links by updating the blog components. See Blog components and sample pages.