H-entry

De Mi caja de notas

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


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

En utilisant un parseur microformats2, et en cherchant des items h-entry, votre code recevra automatiquement à la fois h-entry et l'information de post classique hAtom de la part des pages de posts et pages d'accueil des personnes, qui sont publiés au total par une combinaison à deux chiffres en pourcentage sur le web (grâce aux gabarits par défaut de WordPress qui inclut un tel marquage depuis plus de 5 ans) et tout spécialement les sites IndieWeb.

Le HTML sur une page est historiquement plus précis que les fichiers feed (voir cette page pour plus de détails sur la raison).

Ainsi, pour une meilleure expérience utilisateur, votre code consommateur devrait d'abord consommer le h-entry (et par compatibilité ascendante de ces parseurs, hAtom) des pages avant de regarder les fichiers secondaires.

Comment faire

Comment publier

Utilisez h-entry pour marquer :

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.

Comment consommer h-entry

Pour savoir comment consommer des flux sur plusieurs posts h-entry, voir Comment Consommer des Flux.

Pour consommer un unique h-entry :

  • chercher le premier h-entry sur la page. Si aucun n'est trouvé, cette page ne représente pas un post.

Pour chaque h-entry, Indépendamment du fait qu'il soit traité comme un seul post ou une partie d'un flux :

  • 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

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.

  • …add issues with h-entry consumption to be resolved here.

Exemples IndieWeb

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:

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

Voir aussi