A feed is a collection of posts, typically listed in reverse-chronological order. Homepage feeds usually contain all posts by the author, but many also choose to publish filtered feeds, for example posts of a particular type, or tagged with a particular tag.
Feeds, if correctly marked up, can be subscribed to, parsed and presented by readers.
Historically feeds have been served in separate feed files, in specialized XML formats like RSS or Atom, that are typically polled for updates by feed readers or aggregators. Feeds can also be (and are more and more often) served simply as HTML marked up with h-feed/h-entry, often on an existing page (e.g. homepage) thus not requiring a separate URL (and all the downsides thereof).
Many examples of feeds marked up with HTML+microformats can be found, e.g. on h-entry examples in the wild and h-feed indieweb examples. Add yourself below!
Aaron uses p3k to publish various feeds on aaronparecki.com, all marked up with h-entry and h-card:
- homepage feed containing all Aaron’s posts apart from responses and metrics
- Content-specific feeds, for example notes, articles and replies
- Tag-filtered feeds, for example #indieweb — note that this includes not only posts by Aaron but also posts tagged with #indieweb which he’s replied to
- A mentions feed, of every mention Aaron’s site has received
Barnaby uses Taproot publishes various feeds on waterpigs.co.uk, all marked up with h-feed, h-entry and h-card:
- homepage feed containing all Barnaby’s notes (including replies, checkins, photos), articles and tunes
- Content-specific feeds of notes, articles and music
- A (currently very ugly --Barnaby Walters 05:40, 16 March 2014 (PDT)) mentions feed of all the mentions waterpigs.co.uk has received
Tantek Çelik uses Falcon to publish h-feed with h-entry recent (20) items on tantek.com using Falcon. In addition he publishes a legacy Atom feed at tantek.com/updates.atom (reduced to only 3 most recent items as of 2013-09-29 due to Atom inefficiency).
The easiest way to mark up, publish and consume feeds is to use HTML+microformats2, specifically the
h-entry and h-feed vocabularies.
How to Publish
A simple feed can be marked up simply as a page with multiple h-entries on. The h-entries should be marked up in the same way they’re marked up on post permalink pages, although most people choose to leave comments/mentions out in feeds, instead showing comment/like/repost counts. For example:
<p class="p-author h-card">Barnaby Walters</p>
<div class="e-content">Good grief the weather here changes quickly. sun/hail/snow/sun/rain/snow/sun in 1hr</div>
<p><time class="dt-published">2014-03-12 12:00:16+00:00</time></p>
You can optionally also wrap the h-entries in an h-feed.
In addition, consider adding support for PuSH notifications to turn your feed into a real-time stream for PuSH subscribers.
How To Consume
With microformats2 h-entry, generic microformats2 parsers, you can get a JSON representation of any HTML page instead of relying on a separate XML feed.
Use the following algorithm to get feed posts and details for a page:
- Look for the first h-feed. If one is found:
- let the feed name be the name property of the h-feed
- let the default author of posts in the feed be the author property of the h-feed, if it exists
- let the posts in the feed be any h-entry children of the h-feed
- otherwise, let the name of the feed be the value of the
<title> of the page
- let the default author be the representative h-card found on the page
- let the posts in the feed be any h-entries found on the page
- to find earlier/later posts from the same feed, look for rel=prev[ious] and rel=next URLs, parse them in the same way
See also: microformats wiki section about Parsing h-feed.
There is a long history (since 1997) of the development of feeds, most of which has died to due the widespread abandonment of XML as a foundation of anything actually served on the web (largely replaced by HTML and JSON).
There is however still some inertial legacy XML support, some of which you may find sufficiently useful to implement — see backward compatibility.
XML feeds like RSS and Atom are known to be problematic for a variety of reasons, here are a few.
- DRY violation - feed/post content is typically already visible on HTML pages, thus the XML version is a (sometimes lower fidelity even) duplicate.
- visiting a link to an RSS or Atom feed results in seeing a pile of XML in the browser. There have been attempts to make the XML more presentable using XSLT and CSS, basically resulting in what looks like a web page
- added maintenance cost of separate code path for generating XML, coercing embedded content to be XML-friendly, validating, testing etc.
- inefficient (perhaps because extra code to support them was hastily written due to being lower priority than visible HTML)
- "RSS and Atom are not rich enough to describe the kind of social web activities that we have today" — 
- ATOM feeds up to (maybe greater than) 4.5x the size of HTML+microformats 
- This is not true, they are on average smaller - see 
Consuming ATOM or RSS has been shown to be problematic and fragile — one of the creators of NewsGator documented 40+ common problems with feeds, most of which don’t happen when consuming visible HTML web pages (e.g. marked up with h-entry). Some of them still might, but in general most of them either don't, or are quickly automatically fixed because, well, people (including readers of a site) notice that visible HTML is broken and it typically gets fixed quite quickly.
There are legacy systems, e.g. some feed readers, which only support older technologies such as XML-based feeds. For backward compatibility with those you may want to consider publishing the following:
- Atom ActivityStreams object-type annotations, e.g. inside entry elements:
<object-type xmlns="http://activitystrea.ms/spec/1.0/">http://activitystrea.ms/schema/1.0/note</object-type> or
<object-type xmlns="http://activitystrea.ms/spec/1.0/">http://activitystrea.ms/schema/1.0/article</object-type> for the note and article post types respectively.
- (any known live Atom ActivityStreams consumers?)
- How to set up your realtime feed - lots of helpful information related to setting up and testing an ATOM+ActivityStreams+PuSH feed
Documentation of when sites stop publishing and/or consuming legacy RSS/Atom feeds. See also site-deaths.
- 2013-11-06 Not a shutdown (yet), but reduced/damaged functionality to RSS Podcasts in Apple iTunes 11.1 per Apple Communities post: Figuring out podcasts in iTunes 11.1 and iOS 7
- 2013-08-14 Switching off HubMed's RSS and Atom feeds:
I've been considering stopping HubMed's feeds, and the demise of Google Reader seemed like a good incentive to do some spring cleaning. They were quite inefficient old scripts, which made the shared hosting provider unhappy, so today I decided to switch the feeds off. emphasis added.
- 2013-06-30 Google Reader (RSS and Atom consumer) shut down.
- 2013-04-11 Evernote Removing RSS support for public notebooks:
We currently have support for RSS feeds for public notebooks to allow subscribers to automatically get updates to those notebooks. Last night's (4/10/2013) release of the web service removed this support. Attempts to access Public Notebook RSS feeds will return a 404 HTTP response code instead of the heretofore expected content. At this point, the feature was imposing excessive load on the service relative to its use and utility, and the decision was made to remove it.
- 2013-03 Twitter removed RSS feeds. Twitter support discussion:
Keep in mind though that v1 of the API is now deprecated and will cease functioning in March 2013. RSS feeds are no longer supported by the API after that date.