Différences entre versions de « H-entry »
De Mi caja de notas
(Page créée avec « '''<dfn>[http://microformats.org/wiki/h-entry h-entry]</dfn>''' est le vocabulaire microformats2 pour marquer les posts de blog sur les... ») |
|||
Ligne 1 : | Ligne 1 : | ||
+ | {{stub-fr}} | ||
+ | |||
+ | ''anti-sèche extraite de [[blocs de construction indieweb]]'' | ||
+ | |||
+ | <source lang="html4strict"> | ||
+ | <article class="h-entry"> | ||
+ | |||
+ | <div class="e-content"> | ||
+ | |||
+ | <p>Having fun with @aaronpk, helping @border_none attendees mark up their sites with rel="me" links, h-entry classes, and webmention endpoints.</p> | ||
+ | |||
+ | </div> | ||
+ | |||
+ | <time class="dt-published" datetime="2014-10-18 08:42:37">8:42am</time> | ||
+ | |||
+ | </article> | ||
+ | |||
+ | </source> | ||
+ | --- | ||
+ | Cette page a démarré sur [[iwc:h-entry]] et migrera sur [[iwc:h-entry-fr]] | ||
+ | |||
'''<dfn>[http://microformats.org/wiki/h-entry h-entry]</dfn>''' est le vocabulaire [[microformats2-fr|microformats2]] pour marquer les [[posts-fr|posts]] de blog sur les sites web. Il peut aussi s'utiliser pour marquer tout autre contenu basé sur une série épisodique ou chronodatée. | '''<dfn>[http://microformats.org/wiki/h-entry h-entry]</dfn>''' est le vocabulaire [[microformats2-fr|microformats2]] pour marquer les [[posts-fr|posts]] de blog sur les sites web. Il peut aussi s'utiliser pour marquer tout autre contenu basé sur une série épisodique ou chronodatée. | ||
Version du 21 février 2017 à 04:32
Cet article est une débauche. Vous pouvez m’aider à l'améliorer.
anti-sèche extraite de blocs de construction indieweb
<article class="h-entry">
<div class="e-content">
<p>Having fun with @aaronpk, helping @border_none attendees mark up their sites with rel="me" links, h-entry classes, and webmention endpoints.</p>
</div>
<time class="dt-published" datetime="2014-10-18 08:42:37">8:42am</time>
</article>
--- Cette page a démarré sur iwc:h-entry et migrera sur iwc:h-entry-fr
h-entry est le vocabulaire microformats2 pour marquer les posts de blog sur les sites web. Il peut aussi s'utiliser pour marquer tout autre contenu basé sur une série épisodique ou chronodatée.
Pourquoi
Pourquoi publier
Vous devriez ajouter le marquage `h-entry` à votre page d'accueil et vos permaliens parce que c'est le moyen le plus simple de faire que ces pages soient facilement lisibles pour les lecteurs indieweb,
Ajoutez h-entry à vos pages de post permet la découverte de l'information de post sur vos permalients, ce qui est utilise pour une diversité de choses, parmi lesquelles :
- contexte de syndication de réponse
- syndication de vos réponses à partir de votre site sous forme de commentaires sur les permaliens des sites auxquels vous répondez.
Ajouter h-entry à votre page d'accueil permet :
- de s'abonner à vos posts directement à partir de votre page d'accueil (pas besoin de flux séparé).
- Un bloc de construction pour ajouter le support de PuSH pour des abonnés en temps réel à vos mises à jour.
Pourquoi consommer
By using a microformats2 parser, and looking for h-entry items, your code will automatically get both h-entry and classic hAtom post information from people's post pages and home pages, which are published in total in combination by a double digit percentage of the web (thanks to WordPress default templates including such markup for 5+ years), and especially cutting edge IndieWeb sites.
HTML on a page is historically more accurate than feed files (see that page for more details on why).
Thus for the best user experience, your consuming code should first consume the h-entry (and by backward compat of such parsers, hAtom) of pages before looking at secondary side files.
Comment faire
Comment publier
Utilisez h-entry pour marquer :
- posts, y compris:
- notes
- articles
- commentaires
- ... et sous les autres types de post.
h-entries will typically be used in two places: alone on post permalink pages and in plural on feed pages. On post permalink pages they should be a top-level microformat (not nested under anything). On feed pages they may also be children of a h-feed if you wish to add feed-level data like feed name, author.
How to consume h-entry
For how to consume feeds of multiple h-entry posts, see How To Consume Feeds.
To consume a single h-entry:
- look for the first h-entry on the page. If none are found, this page does not represent a post.
For each h-entry, regardless of whether they’re being treated as a single post or part of a feed:
- to find the author of the h-entry, use the authorship algorithm
- to determine how to display the post as a comment, use the comment presentation algorithm
- to determine the published datetime:
- if the h-entry has a published or updated property which is a valid datetime
- if the datetime is floating (i.e. has no timezone), use the implied timezone heuristic to determine the timezone
- if the fixed published datetime is in the future, cap it to the present
- you may wish to preserve the source timezone in the derived time, and optionally also allow a small window within which “future” posts are accepted e.g. 10 minutes
- if there was no datetime, let the published datetime of the post be the datetime it was first seen
- if the h-entry has a published or updated property which is a valid datetime
When notified of an update to a h-entry, either by webmention or PuSH or any other plumbing:
- optionally archive current status of
- update the updated property to be the updated date of the post using the same datetime resolving process given above
- re-apply the above per-h-entry algorithm, ignoring any updates to the published
See also the processes documented on comment for handling incoming comments, updates and deletions.
Problèmes
move general processing
Many of the processes documented on comment (e.g. deletion) can be applied equally to other cases of h-entry consumption (e.g. in a reader), and some of the detail given here applies to comments processing (e.g. datetime processing). Anything which is applicable to general h-entry processing should be moved here, leaving only anything specific to the comment use-case on comment, and these algorithm referred to from there --Barnaby Walters 05:33, 9 June 2014 (PDT)
bad hentry properties
Some h-entrys encountered are missing a "content" property and have just the implied "p-name" property which end up with an inappropriate value for the name. These URLs were sent via pingback to a blog post on aaronparecki.com, and are hEntry posts rather than the microformats2 version.
- WordPress classic microformats "hentry" markup:
- http://raymondhlee.wordpress.com/2014/12/21/implementing-oauth2-with-spring-security/
- http://curiouser.cheshireeng.com/2014/09/10/digression-using-oauth-2-0-at-wordpress-com/
- http://blogmobile.itude.com/2014/04/08/checklist-for-building-an-api/
- Analysis: Hypothesis: Perhaps the default WordPress core "hentry" with broken themes (that lack the rest of the hentry properties) is the source of the problem.
- Proposed resolution: Perhaps classic microformats backcompat parsing should not get any implied properties, since no classic microformats authors ever expect implied properties to happen.
- …add issues with h-entry consumption to be resolved here.
IndieWeb Examples
Pretty much everyone on the IndieWeb publishes h-entry because it is a fundamental building block for the richer UX of Webmentions of federating and displaying comments, and showing higher fidelity reply-contexts on reply pages as well.
E.g. see people's personal sites linked from irc-people.
Qui l'utilise
Numerous projects and sites are parsing and consuming h-entry for various purposes, including:
- reply-context - see in particular indieweb sites that show reply context information parsed from h-entry + h-card
- comment-presentation - e.g. see indieweb sites that show comments on posts syndicated in via parsing h-entry from others' reply posts.
In short, h-entry is the key building block for the indieweb. It represents a unit of content, to be syndicated, for a variety of use-cases.
Requêtes
Requests to add h-entry support. Both publishing and consuming code.
Requested consuming code
- Firefox reader functionality: https://bugzilla.mozilla.org/show_bug.cgi?id=543630