H-card

De Mi caja de notas


hCard est le vocabulaire microformats2 pour marquer des personnes, organisations et des lieux sur les sites web.

Pourquoi

Chaque site IndieWeb devrait avoir une hCard sur la page d'accueil, contenant de préférence au moins les propriétés name, url et photo (ou logo) - juste ces trois couvrent la plupart des usages de hCard sur l'IndieWeb, par exemple, en mettant un nom et un visage sur des commentaires ou des URLs.

Avoir une hCard minimale sur votre page d'index permet des recherches de type Gravatar iwc:Why_web_sign-in-fr#Pourquoi_pas_un_e-mail_personnel_de_domaine au lieu de l'adresse e-mail.

Telegraph utilise votre h-card de page d'accueil pour saisir l'icône et le nom de votre profil après votre connexion. [1]


Comment

Vous pouvez produire une h-card simple qui fait ce qui est décrit ci-dessus avec deux éléments et un nom de classe, par exemple :

<a class="h-card" href="http://waterpigs.co.uk">
<img src="/photo.png" alt="" /> Barnaby Walters</a>

Validateurs

Vous pouvez vérifier la hCard de votre page d'accueil pour la complétude et les erreurs courantes en utilisant ces validateurs :

Problèmes

From a pure user features perspective, and assuming no invisible metadata, how are the following accomplished (that is, with hCard)?

  • I'd like to show some personal profile information (for example, name) on my posts, but not my picture. I may want to show additional profile information on another page, for example. /about. That may include my picture, or it may not (including icon).
  • When I comment, like, repost, or rsvp to someone else's post, and they render that response (comments-presentation), I'd like to let them show my additional profile information, including my picture, if they choose. authorship handles some of this, but maybe not all, for example, the case where I don't show my picture anywhere on my site.
  • Similarly, when I log into a site like this wiki with IndieAuth (etc.), I'd like the site to be able to discover my additional profile information, including my picture, to show on my profile page, activity, or other appropriate places. representative-hcard-parsing gets close, but not all the way. #Brainstorming below is a straw man extension that could help.

From an hCard specific viewpoint, here are some additional issues / questions:

  • Along the same lines, some people (e.g. User:Snarfed.org, User:Mowens.com, portrait gRegor Morrill) would like to make some parts of their hCard invisible everywhere, but still available to programmatic consumers. Examples include rel-me links to some silos, public encryption key. Related: antipatterns#invisible_metadata
    • On my site currently, my author hCard on each post is invisible because I do not feel the need to display my photo, URL, and name on every post. This would be different if it was a multiple-author site. portrait gRegor Morrill
    • I too have made the h-card invisible on my home page because I don't want details to show there for design reasons. Jeremy Cherfas

Brainstorming

One possible solution for the partial plus complete hCard issue is to include a rel-me link to the full hCard and *not* mark up the partial profile information on the home page as an hCard. The representative-hcard-parsing algorithm would then follow the rel-me link and use its full data. It doesn't seem ideal, but it'd work.

One problem with this is that the home page usually has many rel-me links, for example, to silos, and we don't yet have a way to denote the "canonical" one. portrait gRegor Morrill, User:Mowens.com, and others have proposed using u-uid and/or a new rel-canonical property for this.

Voir aussi