IndieWeb v0.0.28 IndieWeb.HCard
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 a remote page and determines the h-card of the current page
Link to this section Functions
Link to this function
fetch_representative(uri)
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-card
withuid
andurl
properties both matching the page URL, the first suchh-card
is the representative h-card. - If no representative h-card was found, if the page contains an
h-card
with a url property value which also has a rel=me relation, the first suchh-card
is the representative h-card - If no representative
h-card
was found, if the page contains one singleh-card
, and theh-card
has a url property matching the page URL, thath-card
is the representativeh-card
Link to this function
fetch_representative(mf2, uri)
Link to this function
resolve(uri)
Obtains a remote page and determines the h-card of the current page.
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.
Link to this function