Tags: webmentions

7

sparkline

Sunday, June 18th, 2017

IndieWebifying my website: part 1, the why & how – AltPlatform

Richard MacManus begins to document the process of making his website part of the indie web.

Sunday, April 16th, 2017

@Mentions from Twitter to My Website

Chris gives a step-by-step walkthrough of enabling webmentions on a Wordpress site.

Saturday, June 4th, 2016

matthiasott/webmention: Webmention Plugin for Craft CMS

A plug-in for Craft CMS for receiving webmentions. I’ll have to tell Charlotte about this (she’s using Craft for her site).

Sunday, January 10th, 2016

Telegraph

A handy new service from Aaron, for those situations when you need to manually send webmentions.

Wednesday, April 23rd, 2014

The Indieweb | Parallel Transport

or: how I learnt to stop worrying and love the blog.

This is a really nice introduction to the basics of the Indie Web …with nice illustrations too.

Sunday, September 15th, 2013

Parsing webmentions

Thanks to everyone who helped me test webmentions that I hacked together at Indie Web Camp last weekend.

Let me explain what web mentions are all about…

Basically, it’s an equivalent to pingback. Let’s say I write something here on adactio.com. Suppose that prompts you to write something in response on your own site. A web mention is a way for you to let me know that your response exists.

If you look in the head of any of my journal posts, you’ll see this link element:

<link rel="webmention" href="http://adactio.com/webmention.php" />

That’s my web mention endpoint: http://adactio.com/webmention.php …it’s kind of like a webhook: a URL that’s intended to be hit by machines rather than people. So when you publish your response to my post, you ping that URL with a POST request that sends two parameters:

  1. target: the URL of my post and
  2. source: the URL of your response.

Ideally your own CMS or blogging system would take care of doing the pinging, but until that’s more widely implemented, I’m providing this form at the end of each of my posts:

Either way, once you ping my web mention endpoint—discoverable through that link rel="webmention"—with those two parameters, I just need to confirm that your post does indeed contain a link to my post—by making a cURL request and parsing your source—and then I return a server response of 202 (Accepted).

Here’s the code for a minimum viable web mention in PHP.

That’s as far as I got at Indie Web Camp but it was enough for me to start collecting responses to posts.

Webmentions as links

The next step is to do something with the responses. After all, I’ve already got the source of each response from those cURL requests.

Barnaby has a written a nice straightforward microformats parser in PHP. I’m using that to check the cURLed source for any responses that have been marked up using h-entry. That’s one of the microformats 2 vocabularies—a much simpler way of writing structured content with microformats.

Aaron, Amber, and Barnaby all sent responses that were marked up with h-entry so now their responses appear in full.

Webmentions as comments

So there you have it. Comments are now open on every journal post on adactio.com …the only catch is that you have to write the comment on your own site. And if you want the content of your post to appear here (instead of just a link) then update your blog post template to include a handful of h-entry classes.

Feel free to use this post as a test. Mark up your blog with h-entry, write a post that links to this URL, and enter the URL of your post in the form below.

Sunday, September 8th, 2013

Testing webmentions

I’m at Indie Web Camp and we’re onto the second day, which involves hacking on stuff (the first day involved discussing stuff).

I’ve had my head down attempting to implement webmentions on my site—basically a simpler form of pingback.

This probably won’t work, and this is the first basic step, but if you write a reply to this post on your own site, you should be able to ping me by entering your post’s URL into the form under this post.

Now, this is just a first run so all I’m doing is gathering the pings—I’m not actually going to fetch and parse your post; that step can come later. But if you want to help me kick the tires on this, write something on your site that links to this post and then enter your post’s URL below.