h-entry: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
(remove "episodic or datestamped" qualifier. it's kinda right in spirit, but not in letter. see https://chat.indieweb.org/microformats/2024-10-17#t1729138929962700)
 
(126 intermediate revisions by 23 users not shown)
Line 1: Line 1:
HOW THING OUT
{{DISPLAYTITLE:h-entry}}
HOW ANYTHING OUT
<dfn style="font-style:normal;font-weight:bold">h-entry</dfn> is a simple, open format for 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.
HOW EVERYTHING OUT
 
HOW UNIVERSE OUT
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]].
HOW MAKE THING OUT
 
HOW MAKE ANYTHING OUT
;<span id="status">Status</span>
HOW MAKE EVERYTHING OUT
: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.
HOW MAKE UNIVERSE OUT
;<span id="participate">Participate</span>
HOW THING BE OUT
:[https://github.com/microformats/h-entry/issues Open Issues]
HOW ANYTHING BE OUT
:[[h-entry-issues|Resolved issues before 2012-246]]
HOW EVERYTHING BE OUT
:[[IRC]]
HOW UNIVERSE BE OUT
:Advance the spec by following explicit [[#change_control|change control]] process
HOW MAKE THING BE OUT
<div class="p-author h-card vcard">
HOW MAKE ANYTHING BE OUT
;<span class="p-role role">Editor</span>
HOW MAKE EVERYTHING BE OUT
:<span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span>
HOW MAKE UNIVERSE BE OUT
</div>
HOW THING OUT
;License
HOW ANYTHING OUT
: {{cc0-owfa-license}}
HOW EVERYTHING OUT
<span style="float:right">__TOC__</span>
HOW UNIVERSE OUT
 
HOW MAKE THING OUT
== Example ==
HOW MAKE ANYTHING OUT
Here is a simple blog post example:
HOW MAKE EVERYTHING OUT
 
HOW MAKE UNIVERSE OUT
<syntaxhighlight lang="html">
HOW THING BE OUT
<article class="h-entry">
HOW ANYTHING BE OUT
  <h1 class="p-name">Microformats are amazing</h1>
HOW EVERYTHING BE OUT
  <p>Published by <a class="p-author h-card" href="http://example.com">W. Developer</a>
HOW UNIVERSE BE OUT
    on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time></p>
HOW MAKE THING BE OUT
 
HOW MAKE ANYTHING BE OUT
  <p class="p-summary">In which I extoll the virtues of using microformats.</p>
HOW MAKE EVERYTHING BE OUT
 
HOW MAKE UNIVERSE BE OUT
  <div class="e-content">
HOW THING OUT
    <p>Blah blah blah</p>
HOW ANYTHING OUT
  </div>
HOW EVERYTHING OUT
</article>
HOW UNIVERSE OUT
</syntaxhighlight>
HOW MAKE THING OUT
 
HOW MAKE ANYTHING OUT
Parsed JSON:
HOW MAKE EVERYTHING OUT
<syntaxhighlight lang="json">
HOW MAKE UNIVERSE OUT
{
HOW THING BE OUT
  "items": [
HOW ANYTHING BE OUT
    {
HOW EVERYTHING BE OUT
      "type": [
HOW UNIVERSE BE OUT
        "h-entry"
HOW MAKE THING BE OUT
      ],
HOW MAKE ANYTHING BE OUT
      "properties": {
HOW MAKE EVERYTHING BE OUT
        "name": [
HOW MAKE UNIVERSE BE OUT
          "Microformats are amazing"
HOW THING OUT
        ],
HOW ANYTHING OUT
        "author": [
HOW EVERYTHING OUT
          {
HOW UNIVERSE OUT
            "value": "W. Developer",
HOW MAKE THING OUT
            "type": [
HOW MAKE ANYTHING OUT
              "h-card"
HOW MAKE EVERYTHING OUT
            ],
HOW MAKE UNIVERSE OUT
            "properties": {
HOW THING BE OUT
              "name": [
HOW ANYTHING BE OUT
                "W. Developer"
HOW EVERYTHING BE OUT
              ],
HOW UNIVERSE BE OUT
              "url": [
HOW MAKE THING BE OUT
                "http://example.com"
HOW MAKE ANYTHING BE OUT
              ]
HOW MAKE EVERYTHING BE OUT
            }
HOW MAKE UNIVERSE BE OUT
          }
HOW THING OUT
        ],
HOW ANYTHING OUT
        "published": [
HOW EVERYTHING OUT
          "2013-06-13 12:00:00"
HOW UNIVERSE OUT
        ],
HOW MAKE THING OUT
        "summary": [
HOW MAKE ANYTHING OUT
          "In which I extoll the virtues of using microformats."
HOW MAKE EVERYTHING OUT
        ],
HOW MAKE UNIVERSE OUT
        "content": [
HOW THING BE OUT
          {
HOW ANYTHING BE OUT
            "value": "Blah blah blah",
HOW EVERYTHING BE OUT
            "html": "<p>Blah blah blah</p>"
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
</syntaxhighlight>
HOW EVERYTHING OUT
 
HOW UNIVERSE OUT
== Get started ==
HOW MAKE THING OUT
The class '''<code>h-entry</code>''' is a ''root class name'' that indicates the presence of an h-entry.
HOW MAKE ANYTHING OUT
 
HOW MAKE EVERYTHING OUT
'''p-name''', '''p-author''', '''dt-published''' and the other h-entry property classnames listed below define properties of the h-entry.
HOW MAKE UNIVERSE OUT
 
HOW THING BE OUT
Note: The purpose of an entry is to place it around both the explicitly written content (in the content property or in other specific properties for non-textual content or responses) and whatever else is the context for that content, including properties for when it was published and/or updated, who created it, tags or categorization, and links to what the content is a response to (perhaps with a quoted excerpt) and/or links to syndicated copies.
HOW ANYTHING BE OUT
 
HOW EVERYTHING BE OUT
== Properties ==
HOW UNIVERSE BE OUT
h-entry properties, inside an element with class '''h-entry'''. All properties are both optional and may have multiple instances, e.g. multiple name, url, photo etc. properties.
HOW MAKE THING BE OUT
* See [[microformats2-parsing]] to learn more about property classnames.
HOW MAKE ANYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
=== Core Properties ===
HOW MAKE UNIVERSE BE OUT
The following ''core'' h-entry properties have broad consensus and are broadly interoperably published and consumed:
HOW THING OUT
* '''<code>p-name</code>''' - entry name/title
HOW ANYTHING OUT
* '''<code>p-summary</code>''' - short entry summary
HOW EVERYTHING OUT
* '''<code>e-content</code>''' - full content of the entry
HOW UNIVERSE OUT
* '''<code>dt-published</code>''' - when the entry was published
HOW MAKE THING OUT
* '''<code>dt-updated</code>''' - when the entry was updated
HOW MAKE ANYTHING OUT
* '''<code>p-author</code>''' - who wrote the entry, optionally embedded [[h-card]](s)
HOW MAKE EVERYTHING OUT
* '''<code>p-category</code>''' - entry categories/tags
HOW MAKE UNIVERSE OUT
* '''<code>u-url</code>''' - entry permalink URL
HOW THING BE OUT
* '''<code>u-uid</code>''' - universally unique identifier, typically canonical entry URL
HOW ANYTHING BE OUT
* '''<code>p-location</code>''' - location the entry was posted from, optionally embed [[h-card]], [[h-adr]], or [[h-geo]]
HOW EVERYTHING BE OUT
* '''<code id="u-syndication">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])
HOW UNIVERSE BE OUT
* '''<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]) ([https://kartikprabhu.com/notes/re-citizen-of-indieweb example])
HOW MAKE THING BE OUT
* '''<code id="p-rsvp">p-rsvp</code>''' (enum, use &lt;data> element or [[value-class-pattern]])
HOW MAKE ANYTHING BE OUT
** "yes", "no", "maybe", "interested". Case-insensitive values, normalized to lowercase. Examples:
HOW MAKE EVERYTHING BE OUT
** <code><nowiki>... <data class="p-rsvp" value="YES">is going</data> to ...</nowiki></code>, or
HOW MAKE UNIVERSE BE OUT
** <code><nowiki>... <data class="p-rsvp" value="Maybe">might go</data> to ...</nowiki></code>
HOW THING OUT
** <code><nowiki>... <data class="p-rsvp" value="no">unable to go</data> to ...</nowiki></code>
HOW ANYTHING OUT
** <code><nowiki>... <data class="p-rsvp" value="interested">am interested/tracking/watching</data>  ...</nowiki></code>
HOW EVERYTHING OUT
* '''<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]]
HOW UNIVERSE OUT
* '''<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]].
HOW MAKE THING OUT
 
HOW MAKE ANYTHING OUT
=== Draft Properties ===
HOW MAKE EVERYTHING OUT
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:
HOW MAKE UNIVERSE OUT
 
HOW THING BE OUT
* '''<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])
HOW ANYTHING BE OUT
** [https://github.com/microformats/h-entry/issues/20 Issue 20]
HOW EVERYTHING BE OUT
* '''<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.
HOW UNIVERSE BE OUT
** [https://github.com/microformats/h-entry/issues/4 Issue 4: u-photo draft->core bc way more than 3+ pub and consuming impls/sites]
HOW MAKE THING BE OUT
*** depends on: [https://github.com/microformats/h-entry/issues/24 Issue 24: Update Definition of Draft Property u-photo]
HOW MAKE ANYTHING BE OUT
*** depends on: [https://github.com/microformats/h-entry/issues/23 Issue 23: E-Content Overlaps with u-photo and similar properties]
HOW MAKE EVERYTHING BE OUT
** Proposed (issue TBF): A <code>u-photo</code> property MUST be on an element that provides a text description for the image (e.g. <code>&lt;img alt=""&gt;</code>) UNLESS the image is already described inside the contents a text property such as <code>p-name</code>, <code>p-summary</code>, or <code>e-content</code>
HOW MAKE UNIVERSE BE OUT
* '''<code id="u-video">u-video</code>''' - special u- parsing rules for <code>&lt;video src> & &lt;source src></code>
HOW THING OUT
** [https://github.com/microformats/h-entry/issues/5 Issue 5]
HOW ANYTHING OUT
 
HOW EVERYTHING OUT
=== Proposed Additions ===
HOW UNIVERSE OUT
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:
HOW MAKE THING OUT
* '''<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]
HOW MAKE ANYTHING OUT
** [https://github.com/microformats/h-entry/issues/6 Issue 6]
HOW MAKE EVERYTHING OUT
* '''<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.
HOW MAKE UNIVERSE OUT
** [https://github.com/microformats/h-entry/issues/31 Issue 32]
HOW THING BE OUT
* '''<code>u-repost</code>''' - similar to u-like, URL to a repost of the current post, e.g. in a responses list or facepile.
HOW ANYTHING BE OUT
** [https://github.com/microformats/h-entry/issues/30 Issue 30]
HOW EVERYTHING BE OUT
* '''<code>u-bookmark-of</code>''' - indicates this h-entry is a bookmark of another URL. Optionally an [[h-cite]]. See [https://indieweb.org/bookmark indieweb.org/bookmark] for examples in the wild.
HOW UNIVERSE BE OUT
** [https://github.com/microformats/h-entry/issues/12 Issue 12]
HOW MAKE THING BE OUT
* '''<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]].
HOW MAKE ANYTHING BE OUT
** +1 sknebel: https://github.com/microformats/h-entry/issues/14
HOW MAKE EVERYTHING BE OUT
* Location Properties - https://github.com/microformats/h-entry/issues/29
HOW MAKE UNIVERSE BE OUT
** '''<code>p-latitude</code>''' - latitude of the location of the entry
HOW THING OUT
** '''<code>p-longitude</code>''' - longitude of the location of the entry
HOW ANYTHING OUT
** '''<code>p-altitude</code>''' - altitude of the location of the entry
HOW EVERYTHING OUT
* '''<code>p-duration</code>''' - duration of an audio or video file in the entry. https://indieweb.org/duration Multiple publishers and consumers in the wild; https://github.com/snarfed/granary/issues/169 more background.
HOW UNIVERSE OUT
** [https://github.com/microformats/h-entry/issues/21 Issue 21]
HOW MAKE THING OUT
* '''<code>p-size</code>''' - size in bytes of an audio or video file in the entry. https://indieweb.org/size Multiple publishers and consumers in the wild; https://github.com/snarfed/granary/issues/169 more background.
HOW MAKE ANYTHING OUT
* '''<code>u-listen-of</code>''' - also known as a 'scrobble', indicates this h-entry is a listen of another URL. Optionally an h-cite. https://github.com/microformats/h-entry/issues/11
HOW MAKE EVERYTHING OUT
* '''<code>u-watch-of</code>''' - indicates this h-entry is a watch of another URL, a visual version of the scrobble. Optionally an h-cite. https://github.com/microformats/h-entry/issues/17
HOW MAKE UNIVERSE OUT
* '''<code>p-read-of</code>''' - indicates this h-entry is a read post of some written work (book or other document). The value can be the title of the work or an h-cite. Proposal also mentions <code>u-read-of</code>, where the value would be a URL to the written work or a representative citation page. https://github.com/microformats/h-entry/issues/10
HOW THING BE OUT
* '''<code>u-translation-of</code>''' - indicates this h-entry is a translation of the linked URL into another language. Can be used in the same way as the existing <code>u-like-of</code> and <code>u-repost-of</code> properties, with just the URL to the original h-entry, or (optionally) contain an embedded <code>h-cite</code>. https://github.com/microformats/h-entry/issues/26
HOW ANYTHING BE OUT
* '''<code>u-checkin</code>''' - the URL of the venue/location h-card which the h-entry is considered a “checkin” of. Optionally an embedded h-card. https://github.com/microformats/h-entry/issues/15
HOW EVERYTHING BE OUT
* '''<code>u-review-of</code>''' - the URL which the h-entry is considered a review of, optionally an embedded h-cite, h-card, h-event, or h-item. This could allow retirement of the h-review as unnecessary, in theory.
HOW UNIVERSE BE OUT
** [https://github.com/microformats/h-entry/issues/32 Issue 32]
HOW MAKE THING BE OUT
 
HOW MAKE ANYTHING BE OUT
The following interpretation is also proposed addition:
HOW MAKE EVERYTHING BE OUT
* if the <code>p-location</code> is also an embedded [[h-card]], the entry is treated as a "checkin".
HOW MAKE UNIVERSE BE OUT
** -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.
HOW THING OUT
 
HOW ANYTHING OUT
Note: As [[h-entry]] usage grows to express and consume different kinds of content, we expect additional properties may be proposed and iterated as demonstrated by real-world needs, usage, and interoperability.
HOW EVERYTHING OUT
 
HOW UNIVERSE OUT
=== Proposing and upgrading ===
HOW MAKE THING OUT
How do you add proposed properties and then upgrade them to draft and then core properties?
HOW MAKE ANYTHING OUT
 
HOW MAKE EVERYTHING OUT
See: [[h-entry#change_control|change control]]
HOW MAKE UNIVERSE OUT
 
HOW THING BE OUT
== Property Details ==
HOW ANYTHING BE OUT
This section is a stub.
HOW EVERYTHING BE OUT
=== p-location ===
HOW UNIVERSE BE OUT
'''<code>p-location</code>''' has been re-used from [[h-event]].
HOW MAKE THING BE OUT
 
HOW MAKE ANYTHING BE OUT
== FAQ ==
HOW MAKE EVERYTHING BE OUT
=== p-name of a note ===
HOW MAKE UNIVERSE BE OUT
<div class="discussion">
HOW THING OUT
* '''What is the <code>p-name</code> of a [https://indieweb.org/note note]?'''
HOW ANYTHING OUT
** You probably should avoid adding <code>p-name</code> to notes. See https://indieweb.org/note for more discussion of the topic.
HOW EVERYTHING OUT
</div>
HOW UNIVERSE OUT
 
HOW MAKE THING OUT
=== venue an entry was posted from ===
HOW MAKE ANYTHING OUT
<div class="discussion">
HOW MAKE EVERYTHING OUT
* '''How do you indicate a named venue where an entry was posted from? Like a restaurant or park.'''
HOW MAKE UNIVERSE OUT
** Use an embedded [[h-card]] microformat on a <code>p-location</code> property value.
HOW THING BE OUT
</div>
HOW ANYTHING BE OUT
 
HOW EVERYTHING BE OUT
=== address an entry was posted from ===
HOW UNIVERSE BE OUT
<div class="discussion">
HOW MAKE THING BE OUT
* '''How do you indicate the address where an entry was posted from? Like a restaurant or park.'''
HOW MAKE ANYTHING BE OUT
** If the address is just part of a named venue, see above, use an [[h-card]]
HOW MAKE EVERYTHING BE OUT
** Otherwise use an embedded [[h-adr]] microformat on a <code>p-location</code> property value.
HOW MAKE UNIVERSE BE OUT
</div>
HOW THING OUT
 
HOW ANYTHING OUT
=== lat long an entry was posted from ===
HOW EVERYTHING OUT
<div class="discussion">
HOW UNIVERSE OUT
* '''How do you indicate the latitude and longitude of where an entry was posted from?'''
HOW MAKE THING OUT
** If the location has a name in addition to latitude and longitude, see above, use an [[h-card]]
HOW MAKE ANYTHING OUT
** Otherwise if there is an address in addition to latitude and longitude, see above, use an [[h-adr]]
HOW MAKE EVERYTHING OUT
** Otherwise use an embedded [[h-geo]] microformat on a <code>p-location</code> property value.
HOW MAKE UNIVERSE OUT
</div>
HOW THING BE OUT
 
HOW ANYTHING BE OUT
=== dt-published property and HTML5 time element ===
HOW EVERYTHING BE OUT
<div class="discussion">
HOW UNIVERSE BE OUT
* '''Does the dt-published property need to be a time element?'''
HOW MAKE THING BE OUT
** The <code>dt-published</code> property should be a <code>&lt;time&gt;</code> element so that you can take advantage of HTML5's "datetime" property.
HOW MAKE ANYTHING BE OUT
** This lets you specify a human-readable date in the value of the attribute, and the ISO8601 machine-readable date in the "datetime" property.
HOW MAKE EVERYTHING BE OUT
</div>
HOW MAKE UNIVERSE BE OUT
 
HOW THING OUT
=== what is the bare minimum list of required properties on an h-entry ===
HOW ANYTHING OUT
; What is the bare minimum list of required properties on an h-entry?
HOW EVERYTHING OUT
: No properties are explicitly required, but in practice a h-entry should have the following properties at a minimum for consumers:
HOW UNIVERSE OUT
:* <code>url</code>
HOW MAKE THING OUT
:* <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.
HOW MAKE ANYTHING OUT
 
HOW MAKE EVERYTHING OUT
; What properties should an h-entry have in addition to the bare minimum?
HOW MAKE UNIVERSE OUT
: Beyond the bare minimum, a typical h-entry should have the following as well:
HOW THING BE OUT
:* <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.
HOW ANYTHING BE OUT
:* <code>name</code> - for explicitly named/titled entries like blog posts and articles. Otherwise the entry is assumed to be a "title-less" [https://indieweb.org/note note] (like a tweet).
HOW EVERYTHING BE OUT
:* <code>author</code> - including a nested <code>[[h-card]]</code> with author details like name, photo, url.
HOW UNIVERSE BE OUT
 
HOW MAKE THING BE OUT
== Examples in the wild ==
HOW MAKE ANYTHING BE OUT
Real world in the wild examples of sites and services that publish or consume h-entry:
HOW MAKE EVERYTHING BE OUT
 
HOW MAKE UNIVERSE BE OUT
* ... add uses of h-entry you see in the wild here.
HOW THING OUT
* ind.ie mark up their [https://ind.ie/blog blog] listing and [https://ind.ie/blog/autumn-events-2014/ permalink] pages with h-entry
HOW ANYTHING OUT
* 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]
HOW EVERYTHING OUT
* [[User:Brian|Brian Suda]] marks up his blog posts up with h-entry and h-card on [http://optional.is/required/ optional.is]
HOW UNIVERSE OUT
* Ashton McAllen marks up his blog posts, reposts, comments and likes with h-entry, h-card and h-cite on [http://acegiak.net/ acegiak.net]
HOW MAKE THING OUT
* Emma Kuo marks up her blog posts and notes with h-entry and h-card on [http://notenoughneon.com/ notenoughneon.com]
HOW MAKE ANYTHING OUT
* Scott Jenson marks up his blog posts with h-entry and h-card on [http://jenson.org/ jenson.org]
HOW MAKE EVERYTHING OUT
* Emily McAllen marks up her blog posts with h-entry and h-card on [http://blackwoolholiday.com/ blackwoolholiday.com]
HOW MAKE UNIVERSE OUT
* Ryan Barrett marks up his blog posts, notes, replies and likes with h-entry and h-card on [https://snarfed.org/ snarfed.org]
HOW THING BE OUT
* Barry Frost marks up his notes with h-entry, h-card and h-cite on [http://barryfrost.com/ barryfrost.com]
HOW ANYTHING BE OUT
* Amber Case marks up her profile, blog posts, replies and notes with h-entry and h-card on [http://caseorganic.com/ caseorganic.com]
HOW EVERYTHING BE OUT
* Johannes Ernst marks up his blog posts with h-entry on [http://upon2020.com/blog/ upon2020.com]
HOW UNIVERSE BE OUT
* Michiel de Jong marks up his profile and notes with h-entry and h-card on [https://michielbdejong.com/ michielbdejong.com]
HOW MAKE THING BE OUT
* Mike Taylor marks up his profile and blog posts with h-card and h-entry on [https://bear.im/bearlog/ bear.im]
HOW MAKE ANYTHING BE OUT
* Erin Jo Ritchey marks up her profile, posts and comments using h-card, h-entry and h-cite with idno on [http://erinjo.is/ erinjo.is]
HOW MAKE EVERYTHING BE OUT
* Jeena Paradies marks up his profile, blog posts, notes and comments using h-card, h-entry and h-cite on [https://jeena.net/ jeena.net]
HOW MAKE UNIVERSE BE OUT
* Andy Sylvester marks up his profile, blog posts and comments using h-card and h-entry on [http://andysylvester.com/2014/03/01/howto-setting-up-the-selfoss-feed-reader-with-microformats-support/ andysylvester.com] (note: as of 2014-03-13 using h-entry for comments instead of correct h-cite --[[User:Barnabywalters|bw]] 14:44, 13 March 2014 (UTC))
HOW THING OUT
* Chloe Weil marks up her blog posts with h-entry on [http://chloeweil.com/blog chloeweil.com]
HOW ANYTHING OUT
* Christophe Ducamp marks up his blog posts and profile with h-entry and h-card on [http://christopheducamp.com/ christopheducamp.com]
HOW EVERYTHING OUT
* Glenn Jones marks up his blog posts, notes, replies, profile and comments with h-entry, h-card and h-cite on [http://glennjones.net/ glennjones.net]
HOW UNIVERSE OUT
* Marcus Povey marks up his blog posts and profile with h-entry and h-card on [http://www.marcus-povey.co.uk/ marcus-povey.co.uk]
HOW MAKE THING OUT
* Matthias Pfefferle marks up his blog posts, comments and profile with h-card, h-cite and h-entry on [http://notizblog.org/ notizblog.org]
HOW MAKE ANYTHING OUT
* Kyle Mahan marks up his profile and notes with h-card and h-entry on [http://kylewm.com/ kylewm.com]
HOW MAKE EVERYTHING OUT
* Okinawan-lyrics marks up his posts with h-entry and h-card ([http://www.okinawan-lyrics.com/ example])
HOW MAKE UNIVERSE OUT
* App.net marks up profile pages and permalink pages with h-entry as of 2013-08-06 ([https://alpha.app.net/voidfiles example])
HOW THING BE OUT
* The Twitter archive browser UI uses h-entry and h-card internally, unfortunately it’s not exposed as HTML in static files anywhere
HOW ANYTHING BE OUT
* Brett Comnes marks up his posts with h-entry and h-card ([http://bret.io/2013/06/29/getting-started-with-bower/ example])
HOW EVERYTHING BE OUT
* 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])
HOW UNIVERSE BE OUT
* 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])
HOW MAKE THING BE OUT
* Laurent Eschenauer marks up his posts with h-entry ([http://eschnou.com/entry/first-autonomous-flight-of-my-nodecopter-62-24992.html example])
HOW MAKE ANYTHING BE OUT
* Tom Morris marks up his posts using h-entry ([http://tommorris.org/posts/8417 example])
HOW MAKE EVERYTHING BE OUT
* Numerous newer W3C specs, e.g.
HOW MAKE UNIVERSE BE OUT
** [http://www.w3.org/TR/2013/CR-css3-values-20130404/ CSS Values and Units Module Level 3 - 2013-04-04]
HOW THING OUT
** [http://www.w3.org/TR/2013/CR-css3-conditional-20130404/ CSS Conditional Rules Module Level 3 - 2013-04-04]
HOW ANYTHING OUT
** [http://www.w3.org/TR/2013/WD-css3-page-20130314/ CSS Paged Media Module Level 3 - 2013-03-14]
HOW EVERYTHING OUT
** [http://www.w3.org/TR/2013/WD-css-counter-styles-3-20130221/ CSS Counter Styles Level 3 - 2013-02-21]
HOW UNIVERSE OUT
* [http://wordpress.org/extend/themes/sempress SemPress] is a WordPress theme that supports h-card, h-feed/h-entry.
HOW MAKE THING OUT
* [http://the-pastry-box-project.net/ The Pastry Box Project] use h-card and h-entry markup on their homepage and individual thoughts pages
HOW MAKE ANYTHING OUT
* Aaron Parecki uses h-entry to mark up notes, e.g. [http://aaronparecki.com/2012/230/reply/1 2012/230/reply/1].
HOW MAKE EVERYTHING OUT
* [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
HOW MAKE UNIVERSE OUT
* [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].
HOW THING BE OUT
 
HOW ANYTHING BE OUT
=== offline ===
HOW EVERYTHING BE OUT
* spreadly marks up share permalink pages with h-entry, as well as minimal h-cards and experimental p-like properties
HOW UNIVERSE BE OUT
 
HOW MAKE THING BE OUT
== Validating ==
HOW MAKE ANYTHING BE OUT
* '''[http://indiewebify.me/validate-h-entry/ indiewebify.me h-entry validator]''' parses [[h-entry]] markup, finds common errors and makes suggestions for things to add, with code samples
HOW MAKE EVERYTHING BE OUT
* '''[http://shrewdness.waterpigs.co.uk/test/ Shrewdness h-entry/h-feed validator]''' shows how shrewdness interprets+displays h-entries, with original source and interim formats, works for single h-entries and feed pages
HOW MAKE UNIVERSE BE OUT
 
HOW THING OUT
{{h-spec-section-validating}}
HOW ANYTHING OUT
 
HOW EVERYTHING OUT
== Implementations ==
HOW UNIVERSE OUT
Software implementations that publish or consume h-entry, including themes, plugins, or extensions:
HOW MAKE THING OUT
 
HOW MAKE ANYTHING OUT
(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.)
HOW MAKE EVERYTHING OUT
 
HOW MAKE UNIVERSE OUT
When adding an implementation, please provide and link to its home page and open source repo if any.
HOW THING BE OUT
* [https://gnu.io/social/ GNUsocial] [https://git.gnu.io/gnu/gnu-social/ source code]
HOW ANYTHING BE OUT
* [https://hubzilla.org/hubzilla/ Hubzilla] [https://github.org/redmatrix/hubzilla source code]
HOW EVERYTHING BE OUT
* [http://friendica.com/ Friendica] [https://github.org/friendica/friendica source code]
HOW UNIVERSE BE OUT
* [http://github.com/dissolve/inkblot InkBlot]
HOW MAKE THING BE OUT
* ...
HOW MAKE ANYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
== Backward Compatibility ==
HOW MAKE UNIVERSE BE OUT
=== Publisher Compatibility ===
HOW THING OUT
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:
HOW ANYTHING OUT
 
HOW EVERYTHING OUT
<syntaxhighlight lang="html">
HOW UNIVERSE OUT
<article class="h-entry hentry">
HOW MAKE THING OUT
  <h1 class="p-name entry-title">A Tale Of Two Tags</h1>
HOW MAKE ANYTHING OUT
  <address class="p-author author h-card vcard">
HOW MAKE EVERYTHING OUT
    <a href="https://chandra.example.com/" class="u-url url p-name fn" rel="author">Chandra</a>
HOW MAKE UNIVERSE OUT
  </address>
HOW THING BE OUT
  <time class="dt-published published" datetime="2012-06-20T08:34:46-07:00">June 20, 2012</time>
HOW ANYTHING BE OUT
  <div class="e-content entry-content">
HOW EVERYTHING BE OUT
    <p>It was the best of visible tags, it was the alternative invisible tags.</p>
HOW UNIVERSE BE OUT
    <p>The a tag is perhaps the best of HTML, yet its corresponding invisible link tag has uses too.</p>
HOW MAKE THING BE OUT
  </div>
HOW MAKE ANYTHING BE OUT
  <a href="/category/uncategorized/" rel="category tag" class="p-category">General</a>
HOW MAKE EVERYTHING BE OUT
</article>
HOW MAKE UNIVERSE BE OUT
</syntaxhighlight>
HOW THING OUT
 
HOW ANYTHING OUT
{{note|Note: you may use any valid HTML5 elements. The <code>article h1 address time</code> elements are used in the example as semantically richer suggestions, however in general <code>div span</code> work fine too. The <code>time</code> element is special though in that its <code>datetime</code> attribute provides a more author/user friendly way of separating a machine readable ISO8601 datetime from a human readable summary.
HOW EVERYTHING OUT
}}
HOW UNIVERSE OUT
 
HOW MAKE THING OUT
The list of equivalent [[hAtom]] classnames and rel values is provided below.
HOW MAKE ANYTHING OUT
 
HOW MAKE EVERYTHING OUT
=== Parser Compatibility ===
HOW MAKE UNIVERSE OUT
Microformats parsers {{should}} detect classic properties only if a classic root class name is found and parse them as microformats2 properties.
HOW THING BE OUT
 
HOW ANYTHING BE OUT
If an "h-entry" is found, don't look for an "hentry" on the same element.
HOW EVERYTHING BE OUT
 
HOW UNIVERSE BE OUT
Compat root class name: <code id="hentry">hentry</code><br/>
HOW MAKE THING BE OUT
Properties: (parsed as '''p-''' plain text unless otherwise specified):
HOW MAKE ANYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
* <code>entry-title</code> - parse as '''<code>p-name</code>'''
HOW MAKE UNIVERSE BE OUT
* <code>entry-summary</code> - parse as '''<code>p-summary</code>'''
HOW THING OUT
* <code>entry-content</code> - parse as '''<code>e-content</code>'''
HOW ANYTHING OUT
* <code>published</code> - parse as '''dt-'''
HOW EVERYTHING OUT
* <code>updated</code> - parse as '''dt-'''
HOW UNIVERSE OUT
* <code>author</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>
HOW MAKE THING OUT
* <code>category</code>
HOW MAKE ANYTHING OUT
* <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.
HOW MAKE EVERYTHING OUT
* <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.
HOW MAKE UNIVERSE OUT
 
HOW THING BE OUT
Proposed: ([https://github.com/microformats/h-entry/issues/7 follow-up in issue #7])
HOW ANYTHING BE OUT
* <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/]).
HOW EVERYTHING BE OUT
* <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.)
HOW UNIVERSE BE OUT
 
HOW MAKE THING BE OUT
=== Compat FAQ ===
HOW MAKE ANYTHING BE OUT
==== What about rel bookmark ====
HOW MAKE EVERYTHING BE OUT
Also asked as: ''Why use an h-entry u-url u-uid for permalinks when I have [[rel-bookmark|rel=bookmark]]?''
HOW MAKE UNIVERSE BE OUT
 
HOW THING OUT
A: tl;dr: use <code>class="u-url u-uid"</code> instead of <code>rel=bookmark</code> 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).
HOW ANYTHING OUT
 
HOW EVERYTHING OUT
rel=bookmark was the old [[hAtom]] way of marking up permalinks. Since then two factors have contributed to reducing use of rel inside microformats:
HOW UNIVERSE OUT
* rel by typically* document scoped in [[HTML5]] - thus making it inappropriate for use in microformats that are aggregated, e.g. a collection of posts on a home page or in monthly archives.
HOW MAKE THING OUT
* it is easier to always use class names for properties. When formats use two (or more!) attributes in HTML to specify properties, confusion results in lower data quality (of the markup and thus the stuff that is marked up). Thus per the microformats [[principle]] of [[simplicity]], in [[microformats2]] we only use class names for properties.
HOW MAKE ANYTHING OUT
 
HOW MAKE EVERYTHING OUT
<nowiki>*</nowiki> even though rel=bookmark in particular is article-element / sectioning scoped in HTML5[http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-bookmark], 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.
HOW MAKE UNIVERSE OUT
 
HOW THING BE OUT
==== Why rename entry-title entry-summary entry-content ====
HOW ANYTHING BE OUT
The <code>entry-*</code> 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#Could_hAtom_instead_use_title_content_and_summary|hAtom FAQ]]).
HOW EVERYTHING BE OUT
 
HOW UNIVERSE BE OUT
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.
HOW MAKE THING BE OUT
 
HOW MAKE ANYTHING BE OUT
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'''.
HOW MAKE EVERYTHING BE OUT
 
HOW MAKE UNIVERSE BE OUT
See also: [http://krijnhoetmer.nl/irc-logs/microformats/20120830#l-128 2012-08-30 IRC conversation].
 
== Related Work ==
Work that re-uses or builds upon h-entry:
* [https://mailpile.pagekite.me:8080/p/Open_Message_Format Mailpile Open Message Format] is using h-entry with structured properties, e.g. p-author h-card.
 
== Background ==
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 been 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. File an issue to collect necessary citations for the requirements for each property being proposed or upgraded, explain how citations fulfill the requirements for the phase(s), get consensus on both (resolve any implementer objections) in the issue.
 
;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 ==
* [[h-feed]]
* [[microformats2]]
* [[microformats2-parsing]]
* [[h-geo]]
* [[hCard]]
 
[[Category:Specifications]]

Latest revision as of 23:56, 17 October 2024

h-entry is a simple, open format for 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
Advance the spec by following explicit change control process
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 2024-11-25, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

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.

Note: The purpose of an entry is to place it around both the explicitly written content (in the content property or in other specific properties for non-textual content or responses) and whatever else is the context for that content, including properties for when it was published and/or updated, who created it, tags or categorization, and links to what the content is a response to (perhaps with a quoted excerpt) and/or links to syndicated copies.

Properties

h-entry properties, inside an element with class h-entry. All properties are both optional and may have multiple instances, e.g. multiple name, url, photo etc. properties.

Core Properties

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

  • p-name - entry name/title
  • p-summary - short entry summary
  • e-content - full content of the entry
  • dt-published - when the entry was published
  • dt-updated - when the entry was updated
  • p-author - who wrote the entry, optionally embedded h-card(s)
  • p-category - entry categories/tags
  • u-url - entry permalink URL
  • u-uid - universally unique identifier, typically canonical entry URL
  • p-location - location the entry was posted from, optionally embed h-card, h-adr, or h-geo
  • u-syndication - URL(s) of syndicated copies of this post. The property equivalent of rel-syndication (example)
  • u-in-reply-to - 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 (reply-context) (example)
  • p-rsvp (enum, use <data> element or value-class-pattern)
    • "yes", "no", "maybe", "interested". Case-insensitive values, normalized to lowercase. Examples:
    • ... <data class="p-rsvp" value="YES">is going</data> to ..., or
    • ... <data class="p-rsvp" value="Maybe">might go</data> to ...
    • ... <data class="p-rsvp" value="no">unable to go</data> to ...
    • ... <data class="p-rsvp" value="interested">am interested/tracking/watching</data> ...
  • u-like-of - the URL which the h-entry is considered a “like” (favorite, star) of. Optionally an embedded h-cite
  • u-repost-of - the URL which the h-entry is considered a “repost” of. Optionally an embedded h-cite.

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:

  • if the p-location is also an embedded h-card, the entry is treated as a "checkin".
    • -1 Aaronpk 14:22, 19 January 2017 (UTC) this post is not a checkin, but has an h-card as the p-location property.

Note: As h-entry usage grows to express and consume different kinds of content, we expect additional properties may be proposed and iterated as demonstrated by real-world needs, usage, and interoperability.

Proposing and upgrading

How do you add proposed properties and then upgrade them to draft and then core properties?

See: change control

Property Details

This section is a stub.

p-location

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

FAQ

p-name of a note

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:
  • url
  • published — if there is no "published" date for the "entry", then reconsider whether it is correct (or worth) marking it up as an entry.
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:
  • content (or summary at least) - especially for structured content. For a plain text note, the content/summary (whichever is used) should be the same as the name, otherwise it will be implied from the text content of the root element.
  • name - for explicitly named/titled entries like blog posts and articles. Otherwise the entry is assumed to be a "title-less" note (like a tweet).
  • author - including a nested h-card with author details like name, photo, url.

Examples in the wild

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.
  • ind.ie mark up their blog listing and 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 davidjohnmead.com
  • Brian Suda marks up his blog posts up with h-entry and h-card on optional.is
  • Ashton McAllen marks up his blog posts, reposts, comments and likes with h-entry, h-card and h-cite on acegiak.net
  • Emma Kuo marks up her blog posts and notes with h-entry and h-card on notenoughneon.com
  • Scott Jenson marks up his blog posts with h-entry and h-card on jenson.org
  • Emily McAllen marks up her blog posts with h-entry and h-card on blackwoolholiday.com
  • Ryan Barrett marks up his blog posts, notes, replies and likes with h-entry and h-card on snarfed.org
  • Barry Frost marks up his notes with h-entry, h-card and h-cite on barryfrost.com
  • Amber Case marks up her profile, blog posts, replies and notes with h-entry and h-card on caseorganic.com
  • Johannes Ernst marks up his blog posts with h-entry on upon2020.com
  • Michiel de Jong marks up his profile and notes with h-entry and h-card on michielbdejong.com
  • Mike Taylor marks up his profile and blog posts with h-card and h-entry on bear.im
  • Erin Jo Ritchey marks up her profile, posts and comments using h-card, h-entry and h-cite with idno on erinjo.is
  • Jeena Paradies marks up his profile, blog posts, notes and comments using h-card, h-entry and h-cite on jeena.net
  • Andy Sylvester marks up his profile, blog posts and comments using h-card and h-entry on andysylvester.com (note: as of 2014-03-13 using h-entry for comments instead of correct h-cite --bw 14:44, 13 March 2014 (UTC))
  • Chloe Weil marks up her blog posts with h-entry on chloeweil.com
  • Christophe Ducamp marks up his blog posts and profile with h-entry and h-card on christopheducamp.com
  • Glenn Jones marks up his blog posts, notes, replies, profile and comments with h-entry, h-card and h-cite on glennjones.net
  • Marcus Povey marks up his blog posts and profile with h-entry and h-card on marcus-povey.co.uk
  • Matthias Pfefferle marks up his blog posts, comments and profile with h-card, h-cite and h-entry on notizblog.org
  • Kyle Mahan marks up his profile and notes with h-card and h-entry on kylewm.com
  • Okinawan-lyrics marks up his posts with h-entry and h-card (example)
  • App.net marks up profile pages and permalink pages with h-entry as of 2013-08-06 (example)
  • The Twitter archive browser UI uses h-entry and h-card internally, unfortunately it’s not exposed as HTML in static files anywhere
  • Brett Comnes marks up his posts with h-entry and h-card (example)
  • Ben Werdmuller marks up his posts with h-card and h-entry, u-in-reply-to and u-like (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 (example)
  • Laurent Eschenauer marks up his posts with h-entry (example)
  • Tom Morris marks up his posts using h-entry (example)
  • Numerous newer W3C specs, e.g.
  • SemPress is a WordPress theme that supports h-card, h-feed/h-entry.
  • The Pastry Box Project use h-card and h-entry markup on their homepage and individual thoughts pages
  • Aaron Parecki uses h-entry to mark up notes, e.g. 2012/230/reply/1.
  • Tantek Çelik uses h-entry on his home page, as well as h-entry on all post permalinks, e.g. 2012-243 post, with rel-prev/rel-next (if applicable) to indicate prev/next posts
  • Barnaby Walters uses h-entry on all notes and articles, as well as nested within notes as reply contexts example and comments example.

offline

  • spreadly marks up share permalink pages with h-entry, as well as minimal h-cards and experimental p-like properties

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:

<article class="h-entry hentry">
  <h1 class="p-name entry-title">A Tale Of Two Tags</h1>
  <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="e-content entry-content">
    <p>It was the best of visible tags, it was the alternative invisible tags.</p>
    <p>The a tag is perhaps the best of HTML, yet its corresponding invisible link tag has uses too.</p>
  </div>
  <a href="/category/uncategorized/" rel="category tag" class="p-category">General</a>
</article>
ℹ️ Note: Note: you may use any valid HTML5 elements. The article h1 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

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):

  • entry-title - parse as p-name
  • entry-summary - parse as p-summary
  • entry-content - parse as e-content
  • published - parse as dt-
  • updated - parse as dt-
  • author - including compat root vcard in the absence of h-card
  • category
  • rel=bookmark - parse as u-url. 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 u-url property, including handling any relative URL resolution.
  • rel=tag - parse as p-category. 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 p-category property.

Proposed: (follow-up in issue #7)

  • time.entry-date[datetime] - in the absence of published, parse as dt-published. parse for the first <time> element with class name of entry-date and non-empty datetime attribute inside an hentry, if there is no published property, use that time element's datetime attribute value for the dt-published property. Evidence: default WordPress themes 2011-2014([1][2][3][4]).
  • rel=author - in the absence of author, parse as u-author. 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 u-author property if there is no "author" property. (citations to "hentry" examples in the wild that depend 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 author backcompat parsing.)

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:

  • rel by typically* document scoped in HTML5 - thus making it inappropriate for use in microformats that are aggregated, e.g. a collection of posts on a home page or in monthly archives.
  • it is easier to always use class names for properties. When formats use two (or more!) attributes in HTML to specify properties, confusion results in lower data quality (of the markup and thus the stuff that is marked up). Thus per the microformats principle of simplicity, in microformats2 we only use class names for properties.

* 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 been 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. File an issue to collect necessary citations for the requirements for each property being proposed or upgraded, explain how citations fulfill the requirements for the phase(s), get consensus on both (resolve any implementer objections) in the issue.

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