Current section

Files

Jump to
indieweb priv dist doc IndieWeb.HCard.html
Raw

priv/dist/doc/IndieWeb.HCard.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.19.3">
<title>IndieWeb.HCard — IndieWeb v0.0.31</title>
<link rel="stylesheet" href="dist/html-399e30b9b028e3059575.css" />
<link rel="canonical" href="https://hexdocs.pm/indieweb/IndieWeb.HCard.html" />
<script src="dist/sidebar_items-23b3c70799.js"></script>
<script async src="dist/html-399e30b9b028e3059575.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="https://indieweb.org/" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
IndieWeb </h1>
<h2 class="sidebar-projectVersion">
v0.0.31
</h2>
</div>
<img src="assets/logo.png" alt="IndieWeb" class="sidebar-projectImage">
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">IndieWeb v0.0.31</small>
IndieWeb.HCard
<a href="https://git.jacky.wtf/indieweb/elixir" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="moduledoc">
<p>Extracts the representative <a href="http://indieweb.org/h-card">h-card</a> of the provided URI.</p>
</section>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#fetch_representative/1">fetch_representative(uri)</a>
</div>
<div class="summary-synopsis"><p>Obtains the representative h-card of the provided URI</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#fetch_representative/2">fetch_representative(mf2, uri)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#resolve/1">resolve(uri)</a>
</div>
<div class="summary-synopsis"><p>Obtains a remote page and determines the h-card of the current page</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#resolve/2">resolve(mf2, uri)</a>
</div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Functions </h1>
<div class="functions-list">
<section class="detail" id="fetch_representative/1">
<div class="detail-header">
<a href="#fetch_representative/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">fetch_representative(uri)</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Obtains the representative h-card of the provided URI.</p>
<p>The <a href="http://microformats.org/wiki/representative-h-card-parsing" title="">steps for parsing a representative h-card</a> are as follows:</p>
<ul>
<li>If the page contains an <code class="inline">h-card</code> with <code class="inline">uid</code> and <code class="inline">url</code> properties
both matching the page URL, the first such <code class="inline">h-card</code> is the
<strong>representative h-card</strong>.
</li>
<li>If no representative h-card was found, if the page contains an
<code class="inline">h-card</code> with a url property value which also has a rel=me
relation, the first such <code class="inline">h-card</code> is the <strong>representative h-card</strong>
</li>
<li>If no representative <code class="inline">h-card</code> was found, if the page contains one
single <code class="inline">h-card</code>, and the <code class="inline">h-card</code> has a url property matching the
page URL, that <code class="inline">h-card</code> is the representative <code class="inline">h-card</code>
</li>
<li><thunk>
</li>
</ul>
</section>
</section>
<section class="detail" id="fetch_representative/2">
<div class="detail-header">
<a href="#fetch_representative/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">fetch_representative(mf2, uri)</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="resolve/1">
<div class="detail-header">
<a href="#resolve/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">resolve(uri)</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Obtains a remote page and determines the h-card of the current page.</p>
<p>This takes a few approaches to find a h-card for the page in question.
It&#39;ll first search for a top-level h-card on the page.
If there isn&#39;t an obvious one, it&#39;ll search for a representative h-card.</p>
</section>
</section>
<section class="detail" id="resolve/2">
<div class="detail-header">
<a href="#resolve/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">resolve(mf2, uri)</span>
<a href="https://git.jacky.wtf/indieweb/elixir" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener">ExDoc</a> (v0.19.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" rel="noopener" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
</body>
</html>