h-feed: Difference between revisions
Line 138: | Line 138: | ||
Legacy: | Legacy: | ||
*Β [[RSS]]/[[Atom]] [[feed files]] | *Β [[RSS]]/[[Atom]] [[feed files]] | ||
[[Category:microformats]] |
Revision as of 02:09, 23 November 2017
h-feed is a microformats2 experiment with a top level feed object to contain h-entry posts. It is functionally a DRYer replacement for RSS/Atom feed files and thus could supersede them.
How
How to markup
Mark up your
- index page with class="h-feed" (e.g. on the
<html>
or<body>
) - its top level
<h1>
with class="p-name"- if it links to the index (itself) then class="u-url" on that hyperlink
- otherwise if you lack any top level links, this works:
<a class="u-url" href="/"></a>
- markup the h-card you already have on your index page with class="p-author"
- and add class="u-photo" on the representative photo of your index page (e.g. banner etc.), or leave it out and let consumers imply/use the u-photo of the p-author h-card you marked up in the previous step
How to test
Feeds marked up with h-feed should work in the same way as simple lists of h-entries. See How to Test Feeds.
How to consume
Why
So indie readers who subscribe to your site can display:
- a name (and icon) for your site/feed in a list
- authorship of the feed
- multiple feeds from a page (less common)
WordPress and HFeed
A large percentage of WordPress themes use hfeed on every page, as opposed to only on pages with multiple hentrys. Due to the popularity of WordPress, this is present on a large number of websites.
IndieWeb Examples
IndieWeb community members that support h-feed:
Tantek
Tantek Γelik supports h-feed on his tantek.com home page using an index.html template and Falcon since 2012-07-16, at Sandeep Shetty's encouragement, to help with the indie reader he is building.
Shane Becker
Shane Becker supports h-feed on his veganstraightedge.com home page using for his composite feed of posts and on each post-type specific feed (/notes, /articles, /bookmarks, /videos, /notes) since 2012-11-18 (private repo). He previously supported just hfeed on his feeds since 2010-06-04 (private repo).
Will Norris
Will Norris supports h-feed on his willnorris.com home page since mid-2013 using WordPress and a modified version of wordpress-uf2 (modifications to be sent upstream at soonish?)
Kevin Marks
Kevin Marks has had an h-feed on kevinmarks.com since 2013-12-10 and of course has one on known.kevinmarks.com, like all known sites.
Barnaby Walters
Barnaby Walters supports h-feed on his waterpigs.co.uk home page since 2014-01-21
Jeena
Jeena supports h-feed for his blog posts and notes on https://jeena.net since 2014-02-25
Tom Morris
Tom Morris supports h-feed for posts on tommorris.org since 2014-02-25.
Bear
bear supports h-feed for his blog posts at https://bear.im/bearlog since 2014-07-25. Feed discovery is lacking and needs to be added to his home page.
Pelle Wessman
Pelle Wessman supports h-feed for his blog posts, archive, bookmarks and interactions at http://voxpelli.com/ since 2014-09-07. For blog posts only partial content with titles only β for bookmarks and interactions full content.
gRegor Morrill
gRegor Morrill supports h-feed for notes at http://gregorlove.com/notes/ since 2014-??-??.
- Since this feed is not on the homepage, the navigation link to the notes uses
rel="feed"
for feed discovery.
Ben Roberts
Ben Roberts supports h-feed on his site's main page as well as all other post lists including type specific pages (/note, /photo , etc) and monthly archives. Feeds still need next/previous links, these will likely only be on a separate (primary) h-feed off the main page. The main page has had h-feed since March 2014 but was implemented to add h-feed to any post list type page in May 2015.
rhiaro
Amy Guy has h-feed on homepage and all pages which are a collection of her own posts (eg. rhiaro.co.uk/tag/indieweb, rhiaro.co.uk/travel, rhiaro.co.uk/2015, rhiaro.co.uk/likes) since 2015-02-??.
- Plans to add rel=feed or something from homepage/side menu to discover different feeds.
Jonny Barnes
Jonny Barnes supports h-feed for notes at https://jonnybarnes.uk/notes since ?
Eddie Hinkle
Eddie Hinkle has had an h-feed on eddiehinkle.com's homepage, social page, as well as all of the sub-feed pages linked from social since 2017-03-10.
Brainstorming
partial feeds
Partial (e.g. truncated) vs full h-feeds.
A lot of blogs have feeds with partial content, where the entries only have post names/titles, permalinks, and sometimes summaries but not full post content. This could be done for UX reasons where the reader is not subjected to a full long post but a quick list of shorter summaries.
If you do have a partial feed (e.g. on your home page), it is good (for indie reader consumption) to also have a separate full feed page.
The partial feed can use a u-uid u-url
to link to the full feed page which could be discovered by a canonical h-feed discovery algorithm.
<div class="h-feed" id="partial_feed"> <h1 class="p-name"> <a class="u-url" href="#partial_feed">Partial Feed</a></h1> <a class="u-uid u-url" href="/feed.html">Full Feed</a> <ol> <li class="h-entry"><a href="permalink1">Article1 name</a></li> <li class="h-entry"><a href="permalink2">Article2 name</a></li> </ol> </div>
design freedom
The possibility of separate partial vs full feeds provides more design freedom for content publishers, since they can choose to have a full or partial (or no!) feed on their homepage and thus design accordingly.
acegiak: KartikPrabhu: my wife's site (which I'm helping her add microformats etc to) is a potential test for this because she's an artist and wants her landing page to be quite specific in appearance.
from: http://indiewebcamp.com/irc/2014-03-27/line/1395970560
canonical feed autodiscovery
prior work
Feed readers discover the links to legacy RSS/Atom feed files automatically from HTML pages by parsing for links with rel="alternate"
and type="application/rss+xml"
or type="application/atom+xml"
respectively.
When such links use the <link>
tag in the <head>
of the page, this provides the potential for a nice UX where the user does not need to know about the 'plumbing' of feeds / feed files.
Example from adactio.com in Feedly
How can (possibly multiple) h-feed feeds be discovered similarly?
rel feed
Link to h-feed marked-up html pages from the home page using rel="feed"
with type="text/html"
and an optional title=""Feed Title"
. Also, suggested to have rel="feed alternate"
. See also rel-feed.
More on:
1. http://tools.ietf.org/html/draft-ietf-atompub-autodiscovery-01
2. http://blog.whatwg.org/feed-autodiscovery
url uid
Alternatively, if an h-feed has a u-url u-uid property that is not the URL of the current page itself, then that u-url u-uid URL can be treated as the canonical full feed.
Articles
- "IndieWeb: fragment subscriptions to microformats" on Superfeedr.
See Also
Legacy: