h-card

From IndieWeb
Jump to: navigation, search


h-card is the microformats2 vocabulary for marking up people, organizations, and venues on web sites.

Contents

Why

Each IndieWeb site should have an h-card on the homepage, preferably containing at least name, url and photo (or logo) properties — just these three cover most h-card usage on the IndieWeb, for example, putting a name and face to comments or URLs.

Having a minimal h-card on your index page allows Gravatar-like lookups based on Why_web_sign-in#Why_not_emaildomain instead of email address.

Telegraph uses your home page h-card to grab your profile icon and name after you log in.[1]

How

You can make a simple h-card that does the above with two elements and one classname, for example:

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

Validators

You can check your homepage h-card for completeness and common mistakes using these validators:

Issues

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

  • 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 h-card specific viewpoint, here are some additional issues / questions:

  • Along the same lines, some people (e.g. User:Snarfed.org, User:Mowens.com, gRegor Morrill) would like to make some parts of their h-card 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. 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

What should be a u-url on the h-card and what shouldn’t?

  1. The specification says u-url is for the identity’s “home page”.
  2. hCard authoring’s Link it up section recommends to add “links to your website, your social network profiles and other sites that represent you specifically to your hCard with the class name url.” (Note that this is linked to indirectly by h-card as h-card-authoring has yet to be written.) And goes on to show an example where rel-me links are given the class.

There are also examples of both readings:

  1. Aaron Parecki only includes his homepages aaronparecki.com and w7apk.com as url properties on his homepage h-card. External profiles can only be found through rel-me parsing.
  2. Tantek Çelik includes all his rel-me links as url properties on his homepage h-card.

What should the general advice be? Are silo identities still homepages to be marked up with u-url?

Brainstorming

One possible solution for the partial plus complete h-card issue is to include a rel-me link to the full h-card and *not* mark up the partial profile information on the home page as an h-card. 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. gRegor Morrill, User:Mowens.com, and others have proposed using u-uid and/or a new rel-canonical property for this.

  • I wonder if there is anything we can do with uid to specify which h-card is the most complete / canonical identity h-card. — Martijn van der Ven

See Also

Retrieved from "http://indieweb.org/h-card"
Personal tools
Namespaces
Variants
Actions
Recent & Upcoming
Resources
Toolbox