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:

AddressFormat
/feed, /feed.rssRSS 2.0
/feed/atomAtom 1.0
/feed.jsonJSON 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/elixir is the RSS feed of the category with the slug elixir.
  • /feed/tag/elixir/atom is the Atom feed of the tag.
  • /feed/author/ada/json is the JSON feed of the blogger with the slug ada.
  • 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.

SettingKeyDefaultWhat it does
Serve RSS, Atom and JSON feedsblog.feeds.enabledOnOff, every feed of the site answers 404 and the site's pages name none.
Posts in a feedblog.feeds.items20How many of the newest posts a feed lists, from 1 to 100.
Put the whole post in a feedblog.feeds.full_contentOnOff, 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+xml or application/feed+json, with charset=utf-8.
  • A feed carries a content hash ETag and the newest post's last-modified, and answers 304 to a request whose if-none-match names the ETag. It is sent with cache-control: public, max-age=300, with no session cookie, and with x-robots-tag: noindex to 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 404 with the plain text Not 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-list draws an RSS link beside its sort button, to the feed of what it shows. blog-post-detail draws one in the line under the title. Set show_feed off to hide it, and feed_text to 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.