h-feed: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
(Undo revision 59675 by [[Special:Contributions/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
Line 1: Line 1:
HOW THING OUT
{{stub}}
HOW ANYTHING OUT
 
HOW EVERYTHING OUT
'''<dfn>h-feed</dfn>''' is a [[microformats2]] experiment with a top level feed object to contain [[h-entry]] posts.
HOW UNIVERSE OUT
 
HOW MAKE THING OUT
From experience with [[hAtom]], it's not clear that there's actually a need (use-case) for a top level feed, but for those that wish to experiment with it, here it is.
HOW MAKE ANYTHING OUT
 
HOW MAKE EVERYTHING OUT
root class name: h-feed
HOW MAKE UNIVERSE OUT
 
HOW THING BE OUT
properties:
HOW ANYTHING BE OUT
* p-name - name of the feed
HOW EVERYTHING BE OUT
* p-author - author of the feed, optionally embed an [[h-card]] {{main|h-card}}
HOW UNIVERSE BE OUT
* u-url - URL of the feed
HOW MAKE THING BE OUT
* u-photo - representative photo / icon for the feed
HOW MAKE ANYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
children:
HOW MAKE UNIVERSE BE OUT
* nested [[h-entry]] objects representing the items of the feed
HOW THING OUT
 
HOW ANYTHING OUT
== Use Cases ==
HOW EVERYTHING OUT
* Generate an Atom feed
HOW UNIVERSE OUT
** This seems like a legacy use-case, not sufficient to actually justify h-feed.
HOW MAKE THING OUT
 
HOW MAKE ANYTHING OUT
* Feed per channel of content - needs a name
HOW MAKE EVERYTHING OUT
** "I will have a feed per tag (channel) so I want to name them." - Sandeep Shetty in #indiewebcamp
HOW MAKE UNIVERSE OUT
** It appears there is some desire to create separate feeds for an indieweb site for separate subsets of content, and name them <em>explicitly</em> accordingly. This presents a need for a container object for the h-entry elements, where the container itself can have a name. This is a potential interesting use-case for an explicit 'h-feed'.
HOW THING BE OUT
 
HOW ANYTHING BE OUT
== Examples in the wild ==
HOW EVERYTHING BE OUT
Add any examples in the wild that you find to the top of this list.
HOW UNIVERSE BE OUT
* ...
HOW MAKE THING BE OUT
* http://sandeep.io/ uses h-feed with p-name and p-author properties and child h-entry posts. In particular using h-feed on the &lt;html&gt; element allows using p-name on the &lt;title&gt; element and re-using the visible window title of the HTML page as the name of the feed, neatly avoiding a [[DRY]] violation.
HOW MAKE ANYTHING BE OUT
* http://tantek.com/ uses h-feed with p-name and p-author properties and child h-entry posts.
HOW MAKE EVERYTHING BE OUT
 
HOW MAKE UNIVERSE BE OUT
== Parsing ==
HOW THING OUT
When parsing a page for an h-feed, do so per [[microformats2]].
HOW ANYTHING OUT
 
HOW EVERYTHING OUT
Fallback:
HOW UNIVERSE OUT
 
HOW MAKE THING OUT
If there is no explicit "h-feed" element, implementations may:
HOW MAKE ANYTHING OUT
* Treat the <code>&lt;title&gt;</code> of the page or the URL of the page as the p-name
HOW MAKE EVERYTHING OUT
* Use http://indiewebcamp.com/authorship to discover authorship of posts.
HOW MAKE UNIVERSE OUT
* Treat top level h-entry elements as items in the feed.
HOW THING BE OUT
 
HOW ANYTHING BE OUT
== FAQ ==
HOW EVERYTHING BE OUT
=== How do I avoid duplicating the page title ===
HOW UNIVERSE BE OUT
''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?''
HOW MAKE THING BE OUT
 
HOW MAKE ANYTHING BE OUT
If you want re-use the &lt;title&gt; of your page as the name of your feed, you can do so by putting the h-feed root class name on the &lt;html&gt; element, and the p-name property class name on the &lt;title&gt; element, e.g. here's a snippet showing how those tags would look:
HOW MAKE EVERYTHING BE OUT
<source lang=html4strict>
HOW MAKE UNIVERSE BE OUT
<html class="h-feed">
HOW THING OUT
  …
HOW ANYTHING OUT
  <title class="p-name">sandeep.io</title>
HOW EVERYTHING OUT
  …
HOW UNIVERSE OUT
</source>
HOW MAKE THING OUT
 
HOW MAKE ANYTHING OUT
Real world example:
HOW MAKE EVERYTHING OUT
* Sandeep Shetty has marked up his home page, http://sandeep.io/ in this way.
HOW MAKE UNIVERSE OUT
 
HOW THING BE OUT
 
HOW ANYTHING BE OUT
=== What should a subscriber do with a page with multiple feeds ===
HOW EVERYTHING BE OUT
''What do I do when a user subscribes to a URL with multiple distinct h-feeds?''
HOW UNIVERSE BE OUT
 
HOW MAKE THING BE OUT
A feed reader should subscribe to the first h-feed it finds at a URL.
HOW MAKE ANYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
Related: http://indiewebcamp.com/reader
HOW MAKE UNIVERSE BE OUT
 
HOW THING OUT
== See Also ==
HOW ANYTHING OUT
* [[h-entry]]
HOW EVERYTHING OUT
* [[microformats2]]
HOW UNIVERSE OUT
* [[hAtom]]
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT
HOW THING OUT
HOW ANYTHING OUT
HOW EVERYTHING OUT
HOW UNIVERSE OUT
HOW MAKE THING OUT
HOW MAKE ANYTHING OUT
HOW MAKE EVERYTHING OUT
HOW MAKE UNIVERSE OUT
HOW THING BE OUT
HOW ANYTHING BE OUT
HOW EVERYTHING BE OUT
HOW UNIVERSE BE OUT
HOW MAKE THING BE OUT
HOW MAKE ANYTHING BE OUT
HOW MAKE EVERYTHING BE OUT
HOW MAKE UNIVERSE BE OUT

Revision as of 09:37, 18 August 2013

This article is a stub. You can help the microformats.org wiki by expanding it.

h-feed is a microformats2 experiment with a top level feed object to contain h-entry posts.

From experience with hAtom, it's not clear that there's actually a need (use-case) for a top level feed, but for those that wish to experiment with it, here it is.

root class name: h-feed

properties:

  • p-name - name of the feed
  • p-author - author of the feed, optionally embed an h-card
    Main article: h-card
  • u-url - URL of the feed
  • u-photo - representative photo / icon for the feed

children:

  • nested h-entry objects representing the items of the feed

Use Cases

  • Generate an Atom feed
    • This seems like a legacy use-case, not sufficient to actually justify h-feed.
  • Feed per channel of content - needs a name
    • "I will have a feed per tag (channel) so I want to name them." - Sandeep Shetty in #indiewebcamp
    • It appears there is some desire to create separate feeds for an indieweb site for separate subsets of content, and name them explicitly accordingly. This presents a need for a container object for the h-entry elements, where the container itself can have a name. This is a potential interesting use-case for an explicit 'h-feed'.

Examples in the wild

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

  • ...
  • http://sandeep.io/ uses h-feed with p-name and p-author properties and child h-entry posts. In particular using h-feed on the <html> element allows using p-name on the <title> element and re-using the visible window title of the HTML page as the name of the feed, neatly avoiding a DRY violation.
  • http://tantek.com/ uses h-feed with p-name and p-author properties and child h-entry posts.

Parsing

When parsing a page for an h-feed, do so per microformats2.

Fallback:

If there is no explicit "h-feed" element, implementations may:

  • Treat the <title> of the page or the URL of the page as the p-name
  • Use http://indiewebcamp.com/authorship to discover authorship of posts.
  • Treat top level h-entry elements as items in the feed.

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>

Real world example:


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