h-entry

(Difference between revisions)

Jump to: navigation, search
(u-photo has moved up from proposed addition to used in the wild, and has acquired a converged common usage - for photo posts, note exception for p-location h-card)
Current revision (23:45, 28 October 2017) (view source)
(Examples in the wild)
 
(45 intermediate revisions not shown.)
Line 1: Line 1:
<entry-title>h-entry</entry-title>
<entry-title>h-entry</entry-title>
-
<span class="h-card vcard"><span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="p-role role">Editor</span>)</span>
+
<dfn style="font-style:normal;font-weight:bold">h-entry</dfn> is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts. h-entry is one of several open [[microformats|microformat]] standards suitable for embedding data in HTML.
-
----
+
-
<dfn style="font-style:normal;font-weight:bold">h-entry</dfn> is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts. h-entry is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5.
+
-
h-entry is the [[microformats2]] update to [[hAtom]]'s "hentry". For an update to "hfeed" see [[h-feed]].
+
h-entry is the [[microformats2]] update to [[hAtom]], in particular its "hentry" root class which itself was based on [[Atom]]'s "entry" element. For an update to "hfeed" see [[h-feed]].
-
{{cc0-owfa-license}}
+
;<span id="Status">Status</span>
 +
:This is a '''Living Specification''' yet mature enough to encourage additional implementations and [[h-entry-issues|feedback]]. This specification has portions that are stable, draft, and proposed. Features are stable unless explicitly labeled draft or proposed, or in draft or proposed sections. Draft and proposed features are likely to change substantively. While substantive changes to stable features are unexpected, it is a living specification subject to substantive change by issues and errata filed in response to implementation experience, requiring consensus among participating implementers as part of an explicit [[#change_control|change control]] process.
 +
;Participate
 +
:[https://github.com/microformats/h-entry/issues Open Issues]
 +
:[[h-entry-issues|Resolved issues before 2012-246]]
 +
:[[IRC]]: [irc://irc.freenode.net/microformats #microformats on Freenode]
 +
<div class="p-author h-card vcard">
 +
;<span class="p-role role">Editor</span>
 +
:<span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span>
 +
</div>
 +
;License
 +
: {{cc0-owfa-license}}
 +
__TOC__
== Example ==
== Example ==
Line 15: Line 25:
   <h1 class="p-name">Microformats are amazing</h1>
   <h1 class="p-name">Microformats are amazing</h1>
   <p>Published by <a class="p-author h-card" href="http://example.com">W. Developer</a>
   <p>Published by <a class="p-author h-card" href="http://example.com">W. Developer</a>
-
     on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time>
+
     on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time></p>
    
    
   <p class="p-summary">In which I extoll the virtues of using microformats.</p>
   <p class="p-summary">In which I extoll the virtues of using microformats.</p>
Line 23: Line 33:
   </div>
   </div>
</article>
</article>
 +
</source>
 +
 +
Parsed JSON:
 +
<source lang=javascript>
 +
{
 +
  "items": [
 +
    {
 +
      "type": [
 +
        "h-entry"
 +
      ],
 +
      "properties": {
 +
        "name": [
 +
          "Microformats are amazing"
 +
        ],
 +
        "author": [
 +
          {
 +
            "value": "W. Developer",
 +
            "type": [
 +
              "h-card"
 +
            ],
 +
            "properties": {
 +
              "name": [
 +
                "W. Developer"
 +
              ],
 +
              "url": [
 +
                "http://example.com"
 +
              ]
 +
            }
 +
          }
 +
        ],
 +
        "published": [
 +
          "2013-06-13 12:00:00"
 +
        ],
 +
        "summary": [
 +
          "In which I extoll the virtues of using microformats."
 +
        ],
 +
        "content": [
 +
          {
 +
            "value": "Blah blah blah",
 +
            "html": "<p>Blah blah blah</p>"
 +
          }
 +
        ]
 +
      }
 +
    }
 +
  ]
 +
}
</source>
</source>
Line 33: Line 89:
== Properties ==
== Properties ==
-
h-entry properties, inside an element with class '''h-entry''':
+
h-entry properties, inside an element with class '''h-entry'''. All properties are optional.
 +
 
 +
=== Core Properties ===
 +
The following ''core'' h-entry properties have broad consensus and are broadly interoperably published and consumed:
* '''<code>p-name</code>''' - entry name/title
* '''<code>p-name</code>''' - entry name/title
* '''<code>p-summary</code>''' - short entry summary
* '''<code>p-summary</code>''' - short entry summary
Line 42: Line 101:
* '''<code>p-category</code>''' - entry categories/tags
* '''<code>p-category</code>''' - entry categories/tags
* '''<code>u-url</code>''' - entry permalink URL
* '''<code>u-url</code>''' - entry permalink URL
-
* '''<code>u-uid</code>''' - unique entry ID
+
* '''<code>u-uid</code>''' - universally unique identifier, typically canonical entry URL
* '''<code>p-location</code>''' - location the entry was posted from, optionally embed [[h-card]], [[h-adr]], or [[h-geo]]
* '''<code>p-location</code>''' - location the entry was posted from, optionally embed [[h-card]], [[h-adr]], or [[h-geo]]
-
 
-
The following experimental properties are in use in the wild (published and consumed) but are not yet part of the spec:
 
-
 
-
* '''<code>p-comment</code>''' - optionally embedded (or nested?) h-cite(s), each of which is a comment on/reply to the parent h-entry. See [[comment-brainstorming]] ([http://waterpigs.co.uk/notes/4V2DjG/ example])
 
* '''<code>u-syndication</code>''' - URL(s) of syndicated copies of this post. The property equivalent of [[rel-syndication]] ([http://erinjo.is/2014/checked-into-rockit-colabs-23 example])
* '''<code>u-syndication</code>''' - URL(s) of syndicated copies of this post. The property equivalent of [[rel-syndication]] ([http://erinjo.is/2014/checked-into-rockit-colabs-23 example])
* '''<code>u-in-reply-to</code>''' - the URL which the h-entry is considered reply to (i.e. doesn’t make sense without context, could show up in comment thread), optionally an embedded [[h-cite]] ([http://indiewebcamp.com/reply-context reply-context]) ([http://waterpigs.co.uk/notes/4V2DjG/ example])
* '''<code>u-in-reply-to</code>''' - the URL which the h-entry is considered reply to (i.e. doesn’t make sense without context, could show up in comment thread), optionally an embedded [[h-cite]] ([http://indiewebcamp.com/reply-context reply-context]) ([http://waterpigs.co.uk/notes/4V2DjG/ example])
-
* '''<code>u-like-of</code>''' - the URL which the h-entry is considered a “like” (favorite, star) of. Optionally an embedded [[h-cite]] ([http://barryfrost.com/posts/11 example])
+
* '''<code id="p-rsvp">p-rsvp</code>''' (enum, use &lt;data> element or [[value-class-pattern]])
-
* '''<code>u-repost-of</code>''' - the URL which the h-entry is considered a “repost” of. Optionally an embedded [[h-cite]].
+
** "yes", "no", "maybe", "interested". Case-insensitive values, normalized to lowercase. Examples:
-
* '''<code>u-photo</code>''' - one or more photos that is/are considered the primary content of the entry, unless there is a <code>p-location h-card</code>, which is still considered a "checkin" (i.e. with a photo). Otherwise the presence of a u-photo means the name of the entry should be interpreted as a caption on the photo, and the summary/content should be interpreted as a description of the photo.
+
** <code><nowiki>... <data class="p-rsvp" value="yes">is going</data> to ...</nowiki></code>, or
 +
** <code><nowiki>... <data class="p-rsvp" value="maybe">might go</data> to ...</nowiki></code>
 +
** <code><nowiki>... <data class="p-rsvp" value="no">unable to go</data> to ...</nowiki></code>
 +
** <code><nowiki>... <data class="p-rsvp" value="interested">am interested/tracking/watching</data>  ...</nowiki></code>
 +
* '''<code id="u-like-of">u-like-of</code>''' - the URL which the h-entry is considered a “like” (favorite, star) of. Optionally an embedded [[h-cite]]
 +
* '''<code id="u-repost-of">u-repost-of</code>''' - the URL which the h-entry is considered a “repost” of. Optionally an embedded [[h-cite]].
-
The following properties are proposed additions based on various existing link preview markup conventions which are ''not'' yet commonly used in the wild (Related: [[link-preview-brainstorming]])
+
=== Draft Properties ===
-
* '''<code>u-audio</code>''' - consider special u- parsing rules for <code>&lt;audio></code>
+
The following draft properties are in use in the wild (published and consumed), and are under strong consideration, but are not yet part of the core:
-
* '''<code>u-video</code>''' - consider special u- parsing rules for <code>&lt;video></code>
+
-
The following interpretation is a proposed addition:
+
* '''<code id="p-comment">p-comment</code>''' - optionally embedded (or nested?) [[h-cite]](s), each of which is a comment on/reply to the parent h-entry. See [[comment-brainstorming]] ([http://waterpigs.co.uk/notes/4V2DjG/ example])
-
* if the <code>p-location</code> is also an embedded [[h-card]], the entry is treated as a "checkin".
+
* '''<code id="u-photo">u-photo</code>''' - one or more photos that is/are considered the primary content of the entry, unless there is a <code>p-location h-card</code>, which is still considered a "checkin" (i.e. with a photo). Otherwise the presence of a u-photo means the name of the entry should be interpreted as a caption on the photo, and the summary/content should be interpreted as a description of the photo.
 +
* '''<code>u-video</code>''' - special u- parsing rules for <code>&lt;video src> & &lt;source src></code>
-
There is a use-case that has no property yet (or used to but it was repurposed in the wild):
 
-
* *-* - a representative photo or image for the entry, e.g. primary photo for an article or subject-cropped photo, suitable for use in a [[link-preview]].
 
 +
=== Proposed Additions ===
 +
The following properties are proposed additions based on various use-cases, such as existing [[link-preview-brainstorming|link preview]] markup conventions, but are awaiting citations of use across multiple sites in the wild, and at least one reader / real world consuming code example:
 +
* '''<code>u-audio</code>''' - special u- parsing rules for <code>&lt;audio src> & &lt;source src></code>. Examples: [http://transportini.com/ Transportini],[https://indieweb.org/podcast#How_to_podcast_with_h-feed possibly more]
 +
* '''<code>u-like</code>''' - similar to p-comment, URL to a like post of the current post, e.g. in a responses list or facepile.
 +
* '''<code>u-repost</code>''' - similar to u-like, URL to a repost of the current post, e.g. in a responses list or facepile.
 +
* '''<code>u-bookmark-of</code>''' - indicates this h-entry is a bookmark of another URL. the value can be a URL or an [[h-cite]]. See [https://indieweb.org/bookmark indieweb.org/bookmark] for examples in the wild.
 +
* '''<code>u-featured</code>''' - a representative photo or image for the entry, e.g. primary photo for an article or subject-cropped photo, suitable for use in a [[link-preview]].
 +
* '''<code>p-latitude</code>''' - latitude of the location of the entry
 +
* '''<code>p-longitude</code>''' - longitude of the location of the entry
-
All properties are optional.
+
The following interpretation is also proposed addition:
-
 
+
* if the <code>p-location</code> is also an embedded [[h-card]], the entry is treated as a "checkin".
-
== Status ==
+
** -1 [[User:Aaronpk|Aaronpk]] 14:22, 19 January 2017 (UTC) [https://aaronparecki.com/2017/01/13/21/ this post] is not a checkin, but has an h-card as the p-location property.  
-
'''h-entry''' is a microformats.org draft specification. Public discussion on h-entry takes place on [[h-entry-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
+
-
 
+
-
h-entry is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-entries up as classic [[hAtom]] entries.
+
== Property Details ==
== Property Details ==
Line 118: Line 182:
* <code>name</code> (can be implied)
* <code>name</code> (can be implied)
* <code>url</code> (can be implied)
* <code>url</code> (can be implied)
-
* <code>published</code>
+
* <code>published</code> — if there is no "published" date for the "entry", then reconsider whether it is correct (or worth) marking it up as an entry.
<div class="discussion">
<div class="discussion">
* What properties should an h-entry have in addition to the bare minimum?
* What properties should an h-entry have in addition to the bare minimum?
Line 125: Line 189:
* <code>content</code> (or <code>summary</code> at least) - especially for structured content. For a plain text note, the content/summary (whichever is used) should be the same as the <code>name</code>, otherwise it will be implied from the text content of the root element.
* <code>content</code> (or <code>summary</code> at least) - especially for structured content. For a plain text note, the content/summary (whichever is used) should be the same as the <code>name</code>, otherwise it will be implied from the text content of the root element.
* <code>name</code> - for explicitly named/titled entries. Otherwise the entry is assumed to be a "title-less" note (like a tweet).
* <code>name</code> - for explicitly named/titled entries. Otherwise the entry is assumed to be a "title-less" note (like a tweet).
-
* <code>author</code> - including a nested <code>[[h-card]]</code>
+
* <code>author</code> - including a nested <code>[[h-card]]</code> with author details like name, photo, url.
== Examples in the wild ==
== Examples in the wild ==
-
Real world in the wild examples:
+
Real world in the wild examples of sites and services that publish or consume h-entry:
* ... add uses of h-entry you see in the wild here.
* ... add uses of h-entry you see in the wild here.
 +
* ind.ie mark up their [https://ind.ie/blog blog] listing and [https://ind.ie/blog/autumn-events-2014/ permalink] pages with h-entry
* David John Mead marks up his profile, blog posts and comments with h-card, h-entry and h-cite on [http://davidjohnmead.com davidjohnmead.com]
* David John Mead marks up his profile, blog posts and comments with h-card, h-entry and h-cite on [http://davidjohnmead.com davidjohnmead.com]
* [[User:Brian|Brian Suda]] marks up his blog posts up with h-entry and h-card on [http://optional.is/required/ optional.is]
* [[User:Brian|Brian Suda]] marks up his blog posts up with h-entry and h-card on [http://optional.is/required/ optional.is]
Line 152: Line 217:
* Matthias Pfefferle marks up his blog posts, comments and profile with h-card, h-cite and h-entry on [http://notizblog.org/ notizblog.org]
* Matthias Pfefferle marks up his blog posts, comments and profile with h-card, h-cite and h-entry on [http://notizblog.org/ notizblog.org]
* Kyle Mahan marks up his profile and notes with h-card and h-entry on [http://kylewm.com/ kylewm.com]
* Kyle Mahan marks up his profile and notes with h-card and h-entry on [http://kylewm.com/ kylewm.com]
-
* Okinawan-lyrics marks up his posts with h-entry and h-card ([http://www.okinawan-lyrics.com/ example])
 
* App.net marks up profile pages and permalink pages with h-entry as of 2013-08-06 ([https://alpha.app.net/voidfiles example])
* App.net marks up profile pages and permalink pages with h-entry as of 2013-08-06 ([https://alpha.app.net/voidfiles example])
* The Twitter archive browser UI uses h-entry and h-card internally, unfortunately it’s not exposed as HTML in static files anywhere
* The Twitter archive browser UI uses h-entry and h-card internally, unfortunately it’s not exposed as HTML in static files anywhere
Line 158: Line 222:
* Ben Werdmuller marks up his posts with h-card and h-entry, u-in-reply-to and u-like ([http://werd.io/view/51d5097fbed7ded0633a5956 example])
* Ben Werdmuller marks up his posts with h-card and h-entry, u-in-reply-to and u-like ([http://werd.io/view/51d5097fbed7ded0633a5956 example])
* Sandeep Shetty marks his posts up with h-card and h-entry, as well as draft u-in-reply-to and experimental u-like properties ([http://sandeep.io/101 example])
* Sandeep Shetty marks his posts up with h-card and h-entry, as well as draft u-in-reply-to and experimental u-like properties ([http://sandeep.io/101 example])
-
* spreadly marks up share permalink pages with h-entry, as well as minimal h-cards and experimental p-like properties ([http://my.spread.ly/share/51d570bc09e9486562000002 example])
 
* Laurent Eschenauer marks up his posts with h-entry ([http://eschnou.com/entry/first-autonomous-flight-of-my-nodecopter-62-24992.html example])
* Laurent Eschenauer marks up his posts with h-entry ([http://eschnou.com/entry/first-autonomous-flight-of-my-nodecopter-62-24992.html example])
* Tom Morris marks up his posts using h-entry ([http://tommorris.org/posts/8417 example])
* Tom Morris marks up his posts using h-entry ([http://tommorris.org/posts/8417 example])
Line 171: Line 234:
* [http://tantek.com/ Tantek Çelik] uses h-entry on his home page, as well as h-entry on all post permalinks, e.g. [http://tantek.com/2012/243/t1/name-beats-title-modern-use-dubline-core-wrong-uf2 2012-243 post], with [[rel-prev]]/[[rel-next]] (if applicable) to indicate prev/next posts
* [http://tantek.com/ Tantek Çelik] uses h-entry on his home page, as well as h-entry on all post permalinks, e.g. [http://tantek.com/2012/243/t1/name-beats-title-modern-use-dubline-core-wrong-uf2 2012-243 post], with [[rel-prev]]/[[rel-next]] (if applicable) to indicate prev/next posts
* [http://waterpigs.co.uk/ Barnaby Walters] uses h-entry on all notes and articles, as well as nested within notes as reply contexts [http://waterpigs.co.uk/notes/1468/ example] and comments [http://waterpigs.co.uk/notes/1482/ example].
* [http://waterpigs.co.uk/ Barnaby Walters] uses h-entry on all notes and articles, as well as nested within notes as reply contexts [http://waterpigs.co.uk/notes/1468/ example] and comments [http://waterpigs.co.uk/notes/1482/ example].
 +
 +
=== offline ===
 +
* spreadly marks up share permalink pages with h-entry, as well as minimal h-cards and experimental p-like properties
== Validating ==
== Validating ==
Line 177: Line 243:
{{h-spec-section-validating}}
{{h-spec-section-validating}}
 +
 +
== Implementations ==
 +
Software implementations that publish or consume h-entry, including themes, plugins, or extensions:
 +
 +
(This section is a stub that needs expansion! In practice, nearly every CMS on every [https://indieweb.org/ indie web] site supports publishing h-entry by default.)
 +
 +
When adding an implementation, please provide and link to its home page and open source repo if any.
 +
* [https://gnu.io/social/ GNUsocial] [https://git.gnu.io/gnu/gnu-social/ source code]
 +
* [https://hubzilla.org/hubzilla/ Hubzilla] [https://github.org/redmatrix/hubzilla source code]
 +
* [http://friendica.com/ Friendica] [https://github.org/friendica/friendica source code]
 +
* [http://github.com/dissolve/inkblot InkBlot]
 +
* ...
== Backward Compatibility ==
== Backward Compatibility ==
=== Publisher Compatibility ===
=== Publisher Compatibility ===
-
For backward compatibility, you may wish to use classic [[hAtom]] classnames in addition to the more future-proof h-entry properties, for example:
+
For backward compatibility with legacy [[hAtom]] consuming implementations, use [[hAtom]] classnames (or rel values) in addition to the more future-proof h-entry properties, for example:
<source lang=html4strict>
<source lang=html4strict>
Line 187: Line 265:
</div>
</div>
</source>
</source>
 +
 +
The list of equivalent [[hAtom]] classnames and rel values is provided below.
=== Parser Compatibility ===
=== Parser Compatibility ===
Line 203: Line 283:
* <code>author</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>
* <code>author</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>
* <code>category</code>
* <code>category</code>
 +
* <code>rel=bookmark</code> - parse as '''<code>u-url</code>'''. While not a class name nor typical microformats property, rel=bookmark was the only way to indicate an hentry permalink. Thus parsers should look for rel=bookmark hyperlinks inside an hentry, and take their "href" value as a value for a '''<code>u-url</code>''' property, including handling any relative URL resolution.
 +
* <code>rel=tag</code> - parse as '''<code>p-category</code>'''. While not a class name nor typical microformats property, rel=tag was the typical way to tag an hentry. Thus parsers should look for rel=tag hyperlinks inside an hentry, and take the last path segment of their "href" value as a value for a '''<code>p-category</code>''' property.
 +
 +
Proposed:
 +
* <code>time.entry-date[datetime]</code> - in the absence of <code>published</code>, parse as '''<code>dt-published</code>'''. parse for the first <code>&lt;time&gt;</code> element with class name of <code>entry-date</code> and non-empty <code>datetime</code> attribute inside an hentry, if there is no <code>published</code> property, use that time element's <code>datetime</code> attribute value for the <code>dt-published</code> property. Evidence: default WordPress themes 2011-2014([https://wp-themes.com/twentyeleven/][https://wp-themes.com/twentytwelve/][https://wp-themes.com/twentythirteen/][https://wp-themes.com/twentyfourteen/]).
 +
* <code>rel=author</code> - in the absence of <code>author</code>, parse as '''<code>u-author</code>'''. While not a class name nor typical microformats property, rel=author was commonly used to link to an author's URL. Thus parsers should look for rel=author hyperlinks inside an hentry (or even on the same page, preceding the hentry), use the absolute version of it as a value for the '''<code>u-author</code>''' property if there is no "author" property. (citations to "hentry" examples in the wild that <em>depend</em> on rel=author needed to accepted this proposal. Note: default WordPress themes twentyeleven, twentytwelve, twentythirteen, twentyfourteen all use rel=author but only inside class="author vcard", and thus rel=author can be ignored since authorship is already picked up by existing <code>author</code> backcompat parsing.)
=== Compat FAQ ===
=== Compat FAQ ===
Line 231: Line 317:
== Background ==
== Background ==
This work is based on the existing [[hAtom]] microformat, and extensive selfdogfooding in the [http://indiewebcamp.com indie web camp] community.
This work is based on the existing [[hAtom]] microformat, and extensive selfdogfooding in the [http://indiewebcamp.com indie web camp] community.
 +
 +
== change control ==
 +
Minor editorial changes (e.g. fixing minor typos or punctuation) that do not change and preferably clarify the structure and existing intended meaning may be done by anyone without filing issues, requiring only a sufficient "Summary" description field entry for the edit. More than minor but still purely editorial changes may be made by an editor. Anyone may question such editorial changes by undoing corresponding edits without filing an issue. Any further reversion or iteration on such an editorial change must be done by filing an issue.
 +
 +
For the stable features of this document, substantive issue filing, resolution, and edits may be done by filing an [[h-entry-issues|issue]] and discussing them on the issue and on #microformats [[IRC]] with a link to the issue.
 +
 +
Because this is primarily a vocabulary specification, very few issues beyond the list of vocabulary have filed or required any lengthy discussion. If such a non-trivial issue arises in the future, use the [[microformats2-parsing#change_control|microformats2-parsing change control process]] to resolve them.
 +
 +
In general, non-vocabulary related features or requirements should be avoided in this specification, e.g. changes to microformats2 syntax must be proposed as [[microformats2-parsing]] changes using the [[microformats2-parsing#change_control|microformats2-parsing change control process]].
 +
 +
Beyond that, the following requirements must be met for adding or moving features (e.g. properties and values) to proposed, draft, or stable:
 +
 +
;Proposed
 +
:[[#Proposed_Additions|Proposed features]] must provide documentation of what specific real world use-cases they are solving, preferably with a link to a step-by-step user scenario, e.g. demonstratable using existing non-standard / single-site / single-implementation tools.
 +
;Draft
 +
:[[#Draft_Properties|Draft properties]] must in addition be published and consumed in the wild on the public web, demonstrate solving the use case for which they were proposed, and should provide citations of real world public web sites publishing and (other sites) consuming them, interoperably.
 +
;Stable
 +
:Stable features (e.g. [[#Core_Properties|Core Properties]]) must in addition be published and consumed in the wild on multiple sites by multiple implementations (3+ different sites and implementations for publishing and  consuming). When a draft property reaches a critical mass of deployment by numerous sites and implementations (far beyond 3+), due to network effects and backward compatibility considerations it effectively becomes stable, since it becomes increasingly difficult to change it in any way and have so many sites and implementations also change.
 +
 +
For creating an entirely new vocabulary, and more details about how to research existing values, properties, document examples in the wild, etc., see the microformats [[process]].
== See Also ==
== See Also ==
Line 239: Line 345:
* [[hCard]]
* [[hCard]]
-
[[Category:Draft Specifications]]
+
[[Category:Specifications]]

Current revision

h-entry is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts. h-entry is one of several open microformat standards suitable for embedding data in HTML.

h-entry is the microformats2 update to hAtom, in particular its "hentry" root class which itself was based on Atom's "entry" element. For an update to "hfeed" see h-feed.

Status
This is a Living Specification yet mature enough to encourage additional implementations and feedback. This specification has portions that are stable, draft, and proposed. Features are stable unless explicitly labeled draft or proposed, or in draft or proposed sections. Draft and proposed features are likely to change substantively. While substantive changes to stable features are unexpected, it is a living specification subject to substantive change by issues and errata filed in response to implementation experience, requiring consensus among participating implementers as part of an explicit change control process.
Participate
Open Issues
Resolved issues before 2012-246
IRC: #microformats on Freenode
Editor
Tantek Çelik
License
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 2017-11-19, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

Contents


Example

Here is a simple blog post example:

<article class="h-entry">
  <h1 class="p-name">Microformats are amazing</h1>
  <p>Published by <a class="p-author h-card" href="http://example.com">W. Developer</a>
     on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time></p>
 
  <p class="p-summary">In which I extoll the virtues of using microformats.</p>
 
  <div class="e-content">
    <p>Blah blah blah</p>
  </div>
</article>

Parsed JSON:

{
  "items": [
    {
      "type": [
        "h-entry"
      ],
      "properties": {
        "name": [
          "Microformats are amazing"
        ],
        "author": [
          {
            "value": "W. Developer",
            "type": [
              "h-card"
            ],
            "properties": {
              "name": [
                "W. Developer"
              ],
              "url": [
                "http://example.com"
              ]
            }
          }
        ],
        "published": [
          "2013-06-13 12:00:00"
        ],
        "summary": [
          "In which I extoll the virtues of using microformats."
        ],
        "content": [
          {
            "value": "Blah blah blah",
            "html": "<p>Blah blah blah</p>"
          }
        ]
      }
    }
  ]
}

Get started

The class h-entry is a root class name that indicates the presence of an h-entry.

p-name, p-author, dt-published and the other h-entry property classnames listed below define properties of the h-entry.

See microformats2-parsing to learn more about property classnames.

Properties

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

Core Properties

The following core h-entry properties have broad consensus and are broadly interoperably published and consumed:

Draft Properties

The following draft properties are in use in the wild (published and consumed), and are under strong consideration, but are not yet part of the core:


Proposed Additions

The following properties are proposed additions based on various use-cases, such as existing link preview markup conventions, but are awaiting citations of use across multiple sites in the wild, and at least one reader / real world consuming code example:

The following interpretation is also proposed addition:

Property Details

This section is a stub.

p-location

p-location has been re-used from h-event.

FAQ

p-name of a note

  • What is the p-name of a note?
    • A few options, from simplest to most detailed.
      • same as the p-content/e-content property.
      • same as the title element on the note permalink post page. When publishing a note on its own permalink post page, the contents of the note are likely abbreviated for the title of the page. The same abbreviation can be used for the p-name.
      • first sentence of the p-content/e-content property. It may be better for syndication and link-preview purposes to provide just the first sentence of the note as the p-name. Similarly if only a portion of the content is syndicated to other sites, that portion can be marked up as the p-summary.

venue an entry was posted from

  • How do you indicate a named venue where an entry was posted from? Like a restaurant or park.
    • Use an embedded h-card microformat on a p-location property value.

address an entry was posted from

  • How do you indicate the address where an entry was posted from? Like a restaurant or park.
    • If the address is just part of a named venue, see above, use an h-card
    • Otherwise use an embedded h-adr microformat on a p-location property value.

lat long an entry was posted from

  • How do you indicate the latitude and longitude of where an entry was posted from?
    • If the location has a name in addition to latitude and longitude, see above, use an h-card
    • Otherwise if there is an address in addition to latitude and longitude, see above, use an h-adr
    • Otherwise use an embedded h-geo microformat on a p-location property value.

dt-published property and HTML5 time element

  • Does the dt-published property need to be a time element?
    • The dt-published property should be a <time> element so that you can take advantage of HTML5's "datetime" property.
    • This lets you specify a human-readable date in the value of the attribute, and the ISO8601 machine-readable date in the "datetime" property.

what is the bare minimum list of required properties on an h-entry

  • What is the bare minimum list of required properties on an h-entry?
    • No properties are explicitly required, but in practice a h-entry should have the following properties at a minimum for consumers:
  • What properties should an h-entry have in addition to the bare minimum?
    • Beyond the bare minimum, a typical h-entry should have the following as well:

Examples in the wild

Real world in the wild examples of sites and services that publish or consume h-entry:

offline

Validating

Main article: validators

Test and validate microformats2 markup in general with:

Implementations

Software implementations that publish or consume h-entry, including themes, plugins, or extensions:

(This section is a stub that needs expansion! In practice, nearly every CMS on every indie web site supports publishing h-entry by default.)

When adding an implementation, please provide and link to its home page and open source repo if any.

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-entry properties, for example:

<div class="h-entry hentry">
  <h1 class="p-name entry-title">My great blog post</h1>
</div>

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

Parser Compatibility

Microformats parsers SHOULD detect classic properties only if a classic root class name is found and parse them as microformats2 properties.

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

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

Proposed:

Compat FAQ

What about rel bookmark

Also asked as: Why use an h-entry u-url u-uid for permalinks when I have rel=bookmark?

A: tl;dr: use class="u-url u-uid" instead of rel=bookmark for post permalinks because it's simpler (fewer attributes), and works better across contexts (permalink page, recent posts on home page, collection of posts on archive pages).

rel=bookmark was the old hAtom way of marking up permalinks. Since then two factors have contributed to reducing use of rel inside microformats:

* even though rel=bookmark in particular is article-element / sectioning scoped in HTML5[5], it's a detail that typical authors are not going to remember, and thus it's not good to depend on it for any kind of format.

Why rename entry-title entry-summary entry-content

The entry-* classnames in classic hAtom were prefixed as such due to concerns about vocabulary overlap with the title (as in job title, completely separate semantic) property in hCard and the summary property in hCalendar (see: hAtom FAQ).

Following the simplicity principle, in microformats2, the aforementioned vagueness of title is dealt with by removing it. As name is now used consistently across all vocabularies as the property which “names” the microformat, it makes sense to use it to mark up the name of a post.

Likewise, adding entry- to summary doesn’t add any useful information, and in practice there have been no problems with blog post summaries overlapping with entry summaries, so it makes sense to simplify to summary. The same applies to entry-content simplified to content.

See also: 2012-08-30 IRC conversation.

Related Work

Work that re-uses or builds upon h-entry:

Background

This work is based on the existing hAtom microformat, and extensive selfdogfooding in the indie web camp community.

change control

Minor editorial changes (e.g. fixing minor typos or punctuation) that do not change and preferably clarify the structure and existing intended meaning may be done by anyone without filing issues, requiring only a sufficient "Summary" description field entry for the edit. More than minor but still purely editorial changes may be made by an editor. Anyone may question such editorial changes by undoing corresponding edits without filing an issue. Any further reversion or iteration on such an editorial change must be done by filing an issue.

For the stable features of this document, substantive issue filing, resolution, and edits may be done by filing an issue and discussing them on the issue and on #microformats IRC with a link to the issue.

Because this is primarily a vocabulary specification, very few issues beyond the list of vocabulary have filed or required any lengthy discussion. If such a non-trivial issue arises in the future, use the microformats2-parsing change control process to resolve them.

In general, non-vocabulary related features or requirements should be avoided in this specification, e.g. changes to microformats2 syntax must be proposed as microformats2-parsing changes using the microformats2-parsing change control process.

Beyond that, the following requirements must be met for adding or moving features (e.g. properties and values) to proposed, draft, or stable:

Proposed
Proposed features must provide documentation of what specific real world use-cases they are solving, preferably with a link to a step-by-step user scenario, e.g. demonstratable using existing non-standard / single-site / single-implementation tools.
Draft
Draft properties must in addition be published and consumed in the wild on the public web, demonstrate solving the use case for which they were proposed, and should provide citations of real world public web sites publishing and (other sites) consuming them, interoperably.
Stable
Stable features (e.g. Core Properties) must in addition be published and consumed in the wild on multiple sites by multiple implementations (3+ different sites and implementations for publishing and consuming). When a draft property reaches a critical mass of deployment by numerous sites and implementations (far beyond 3+), due to network effects and backward compatibility considerations it effectively becomes stable, since it becomes increasingly difficult to change it in any way and have so many sites and implementations also change.

For creating an entirely new vocabulary, and more details about how to research existing values, properties, document examples in the wild, etc., see the microformats process.

See Also

Categories

h-entry was last modified: Saturday, October 28th, 2017

Views