h-feed

(Difference between revisions)

Jump to: navigation, search
(Backward Compatibility: add full publisher example of an h-feed with name, summary, and two entries)
(Publisher Compatibility: no date (class name))
Line 81: Line 81:
       <a href="https://chandra.example.com/" class="u-url url p-name fn" rel="author">Chandra</a>
       <a href="https://chandra.example.com/" class="u-url url p-name fn" rel="author">Chandra</a>
     </address>
     </address>
-
     <time class="date dt-published published" datetime="2012-06-22T09:45:57-07:00">June 21, 2012</time>
+
     <time class="dt-published published" datetime="2012-06-22T09:45:57-07:00">June 21, 2012</time>
     <div class="p-summary entry-summary">
     <div class="p-summary entry-summary">
       <p>From balanced harmony, to divisive misunderstandings, to complementary roles.</p>
       <p>From balanced harmony, to divisive misunderstandings, to complementary roles.</p>
Line 95: Line 95:
       <a href="https://chandra.example.com/" class="u-url url p-name fn" rel="author">Chandra</a>
       <a href="https://chandra.example.com/" class="u-url url p-name fn" rel="author">Chandra</a>
     </address>
     </address>
-
     <time class="date dt-published published" datetime="2012-06-20T08:34:46-07:00">June 20, 2012</time>
+
     <time class="dt-published published" datetime="2012-06-20T08:34:46-07:00">June 20, 2012</time>
     <div class="p-summary entry-summary">
     <div class="p-summary entry-summary">
       <p>It was the best of visible tags, it was the alternative invisible tags.</p>
       <p>It was the best of visible tags, it was the alternative invisible tags.</p>

Revision as of 20:25, 23 June 2020


Tantek Çelik (Editor)


h-feed is a simple, open format for publishing a stream or feed of h-entry posts, like complete posts on a home page or archive pages, or summaries or other brief lists of posts. h-feed is one of several open microformat draft standards suitable for embedding data in HTML.

h-feed is the microformats2 update to hAtom, and in particular its "hfeed" root class.

Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2020-07-15, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

Contents

Properties

h-feed properties, inside an element with class h-feed. All properties are optional.

root class name: h-feed

Core Properties

The following core h-feed properties have broad consensus:

children:

Draft Properties

None currently.

Proposed Properties

The following properties are proposed additions based on various observed examples in the wild, but are awaiting at least one reader / real world consuming code example to become a draft property:

Status

h-feed is a microformats.org draft specification. Public discussion on h-feed takes place on h-entry-feedback and the #microformats irc channel on irc.freenode.net.

h-feed is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-feed up as a classic hAtom "hfeed".

Use Cases

Examples in the wild

Add any examples in the wild that you find to the top of this list.

Implementations

Readers

Proxies

Converters

Backward Compatibility

Publisher Compatibility

For backward compatibility with legacy hAtom consuming implementations, use hAtom classnames (or rel values) in addition to the more future-proof h-feed properties, for example:

<div class="h-feed hfeed">
  <h1 class="p-name site-title">The Markup Blog</h1>
  <p class="p-summary site-description">Stories of elements of their attributes.</p>
 
  <article class="h-entry hentry">
    <a class="u-url" rel="bookmark" href="2020/06/22/balanced-divisive-complementary">
      <h2 class="p-name entry-title">A Tale Of Two Tags: Part 2</h2>
    </a>
    <address class="p-author author h-card vcard">
      <a href="https://chandra.example.com/" class="u-url url p-name fn" rel="author">Chandra</a>
    </address>
    <time class="dt-published published" datetime="2012-06-22T09:45:57-07:00">June 21, 2012</time>
    <div class="p-summary entry-summary">
      <p>From balanced harmony, to divisive misunderstandings, to complementary roles.</p>
    </div>
    <a href="/category/uncategorized/" rel="category tag" class="p-category">General</a>
  </article>
 
  <article class="h-entry hentry">
    <a class="u-url" rel="bookmark" href="2020/06/20/best-visible-alternative-invisible">
      <h2 class="p-name entry-title">A Tale Of Two Tags: Part 1</h2>
    </a>
    <address class="p-author author h-card vcard">
      <a href="https://chandra.example.com/" class="u-url url p-name fn" rel="author">Chandra</a>
    </address>
    <time class="dt-published published" datetime="2012-06-20T08:34:46-07:00">June 20, 2012</time>
    <div class="p-summary entry-summary">
      <p>It was the best of visible tags, it was the alternative invisible tags.</p>
    </div>
    <a href="/category/uncategorized/" rel="category tag" class="p-category">General</a>
  </article>
 
</div>
ℹ️ Note: Note: you may use any valid HTML5 elements. The article h1 h2 address time elements are used in the example as semantically richer suggestions, however in general div span work fine too. The time element is special though in that its datetime attribute provides a more author/user friendly way of separating a machine readable ISO8601 datetime from a human readable summary.

The list of equivalent hAtom classnames and rel values is provided below.

Parser Compatibility

For backward compatibility with existing hAtom content, microformats parsers SHOULD detect classic properties only if a classic root class name is found and parse them as microformats2 properties.

If an "h-feed" is found, don't look for an "hfeed" on the same element.

Compat root class name: hfeed
Properties: (parsed as p- plain text unless otherwise specified):

(this section is a stub and needs review and citations to note what real world examples would each of these backcompat parsing rules actually help parse)

If no "h-feed" nor "hfeed" element is found, however multiple top-level h-entry elements (explicit or backcompat) are found, implementations may use:

FAQ

How do I avoid duplicating the page title

I want to use the name (title) of my page as the name of my feed, how do I avoid duplicating the page title somewhere invisibly on the page as the feed name?

If you want re-use the <title> of your page as the name of your feed, you can do so by putting the h-feed root class name on the <html> element, and the p-name property class name on the <title> element, e.g. here's a snippet showing how those tags would look:

<html class="h-feed"><title class="p-name">sandeep.io</title>

What should a subscriber do with a page with multiple feeds

What do I do when a user subscribes to a URL with multiple distinct h-feeds?

A feed reader should subscribe to the first h-feed it finds at a URL.

Related: http://indiewebcamp.com/reader

See Also

Categories

h-feed was last modified: Wednesday, December 31st, 1969

Views