IndieWeb.HCard (IndieWeb v0.0.66) View Source
Extracts the representative h-card of the provided URI.
Link to this section Summary
Functions
Obtains the representative h-card of the provided URI.
Obtains the representative h-card of the provided URI from the provided MF2.
Obtains a remote page and determines the h-card of the MF2.
Link to this section Functions
Obtains the representative h-card of the provided URI.
The steps for parsing a representative h-card are as follows:
- If the page contains an
h-cardwithuidandurlproperties both matching the page URL, the first suchh-cardis the representative h-card. - If no representative h-card was found, if the page contains an
h-cardwith a url property value which also has a rel=me relation, the first suchh-cardis the representative h-card - If no representative
h-cardwas found, if the page contains one singleh-card, and theh-cardhas a url property matching the page URL, thath-cardis the representativeh-card - <thunk>
Obtains the representative h-card of the provided URI from the provided MF2.
See fetch_representative/1 for more information.
Specs
Obtains a remote page and determines the h-card of the MF2.
This takes a few approaches to find a h-card for the page in question. It'll first search for a top-level h-card on the page. If there isn't an obvious one, it'll search for a representative h-card.