h-entry

(Difference between revisions)

Jump to: navigation, search
(update to)
(properties intro sentence, move backward compatiblity to its own section)
Line 31: Line 31:
== Properties ==
== Properties ==
-
h-entry properties (inside class <code>'''h-entry'''</code>):
+
h-entry properties, inside an element with class '''h-entry''':
-
 
+
* '''<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 60: Line 59:
See also [[link-preview-brainstorming]].
See also [[link-preview-brainstorming]].
-
 
-
For backward compatibility, you may wish to use classic [[hAtom]] classnames in addition to the more future-proof h-entry properties, for example:
 
-
 
-
<source lang=html4strict>
 
-
<div class="h-entry hentry">
 
-
  <h1 class="p-name entry-title">My great blog post</h1>
 
-
</div>
 
-
</source>
 
-
 
-
Microformats parsers should detect classic properties and parse them as microformats 2 properties. If an "h-entry" is found, don't look for an "hentry" on the same element.
 
-
 
-
Compat root class name: <code id="hentry">hentry</code><br/>
 
-
Properties: (parsed as '''p-''' plain text unless otherwise specified):
 
-
 
-
* <code>entry-title</code> - parse as '''<code>p-name</code>'''
 
-
* <code>entry-summary</code>
 
-
* <code>entry-content</code> - parse as '''e-'''
 
-
* <code>published</code> - parse as '''dt-'''
 
-
* <code>updated</code> - parse as '''dt-'''
 
-
* <code>author</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>
 
-
* <code>category</code>
 
-
* <code>geo</code> - parse as '''<code>p-geo h-geo</code>''' including compat root <code>geo</code>
 
-
* <code>latitude</code>
 
-
* <code>longitude</code>
 
== Status ==
== Status ==
Line 120: Line 95:
* [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].
 +
 +
== Backward 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:
 +
 +
<source lang=html4strict>
 +
<div class="h-entry hentry">
 +
  <h1 class="p-name entry-title">My great blog post</h1>
 +
</div>
 +
</source>
 +
 +
=== Parser Compatibility ===
 +
Microformats parsers should detect classic properties 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: <code id="hentry">hentry</code><br/>
 +
Properties: (parsed as '''p-''' plain text unless otherwise specified):
 +
 +
* <code>entry-title</code> - parse as '''<code>p-name</code>'''
 +
* <code>entry-summary</code>
 +
* <code>entry-content</code> - parse as '''e-'''
 +
* <code>published</code> - parse as '''dt-'''
 +
* <code>updated</code> - parse as '''dt-'''
 +
* <code>author</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>
 +
* <code>category</code>
 +
* <code>geo</code> - parse as '''<code>p-geo h-geo</code>''' including compat root <code>geo</code>
 +
* <code>latitude</code>
 +
* <code>longitude</code>
== Background ==
== Background ==

Revision as of 00:28, 15 June 2013

Tantek Çelik (Editor)


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 draft standards suitable for embedding data in HTML/HTML5.

h-entry is the microformats2 update to hAtom.

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">W. Developer</a>
     on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time>
 
  <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>

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 microformats-2-parsing to learn more about property classnames.

Properties

h-entry properties, inside an element with class h-entry:

The following experimental properties are in use in the wild but are not yet part of the spec:

The following properties are proposed additions based on various existing link preview markup conventions which are not yet used in the wild:

See also link-preview-brainstorming.

Status

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

(stub, to be expanded)

hAtom-specific implementations that perform custom display or translation (e.g. to Atom XML) SHOULD prefer p-name over p-entry-title, and use p-entry-title value(s) as a fallback if there is no p-name.

FAQ

  • 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.
  • ...

Examples in the wild

Real world in the wild examples:

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

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

Parser Compatibility

Microformats parsers should detect classic properties 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):

Background

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

Design Principles

(stub, expand)

See Also

Categories

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

Views