This is a list of everything I read while researching and implementing Webmentions in no particular order:

Further reading

External services I’m using

  • Bridgy - Most sites do not send webmentions, so Bridgy fills this gap by automatically scanning various social sites and then sending a webmention to your site.
  • Webmention.io - My site is a static site, and I don’t want to host or implement a Webmention receiver myself. This external service is the webmention receiver. I can include some HTML that tells Bridgy to call that.

Displaying WebMentions

There’s a lot of ways the various types of webmentions can be displayed visually. However, there are specific semantic patterns via microformat classes that should be used. Many sites seem to skip this unfortunately. The indieweb wiki fortunately gives several examples where this is doing correctly.

The general format for all of these are as follows. Notice usage of h-entry, p-author, h-cite, u-comment, etc.

<div class="h-entry">
<h1 class="p-name">The Main Entry</h1>
<p class="p-author h-card">John Smith</p>
<p class="e-content">A few insights I've had:</p>
<h2>Comments</h2>
<div class="u-comment h-cite">
<a class="u-author h-card" href="http://jane.example.com/">
Jane Bloggs
</a>
<p class="p-content p-name">Ha ha ha great article John.</p>
<a class="u-url" href="http://jane.example.com/c12">
<time class="dt-published">2015-07-12 HH:MM</time>
</a>
</div>
<div class="u-comment h-cite">
<a class="u-author h-card" href="http://kim.example.net">
Kim Codes
</a>
<p class="p-content p-name">What were the insights?</p>
<a class="u-url" href="http://kim.example.net/k23">
<time class="dt-published">2015-07-12 HH:MM</time>
</a>
</div>
</div>

Another example, this time of likes:

<li class="p-like h-cite">
<a href="https://instagram.com/p/4CPkIKDckd/#liked-by-341817" class="u-url">
<span class="p-author h-card">
<img
class="u-photo"
src="https://pkcdn.xyz/igcdn-photos-b-a.akamaihd.net/ae05b7dcc1946a0f6c26ff1d293e41122f532dff7d778152b30a4229ac1db68d.jpeg"
data-src="https://pkcdn.xyz/igcdn-photos-b-a.akamaihd.net/ae05b7dcc1946a0f6c26ff1d293e41122f532dff7d778152b30a4229ac1db68d.jpeg"
height="36"`
/>
</span>
</a>
<a style="display:none;" class="p-name u-url" href="http://instagram.com/strangeways">
Ankur
</a>
</li>

Debugging and other stuff

  • Webmentions are Great (Mostly) - As webmentions and the various implementations and tools being somewhat open ended and not consistent, some badly formatted webmentions can be sent (in this case from a poorly written Wordpress plugin, surprise…). Need to ensure this sort of sanity checking is applied; “empty” replies with an emoji should be handled.

The webmentions for this note look like this. Here is an early experiment with fetching and displaying webmentions in Astro:

Read the rest of my notes