Webmention plugin

#1

I have had the webmention plugin for a super long time, but i always have been wondering what are the actual requirements to get content visible there…

as far as i read a few pages when someone shares a page on social media or other site a pingback is supposed to happen towards the linked site, and webmention would then somewhat act as a commenting summery to somewhat display “@whoever shared this on [social or url] bla bla”

most sites i have manually tried didn’t show anything so…

what are the actual requirements to make it work.
is there a list what sites/social networks/plugins are working?

is there something else i am missing?

  • plugin installed
  • added echo webmentions() in template
  • added link in header
2 Likes
#2

@seb, since you forked and extended this plugin, maybe you can help out with this? How far have you got with your new plugin, btw?

1 Like
#3

Oh, there are a lot of sides to this question :slight_smile: Let me break it down to a few steps.

First off: the webmention plugin does three different things: sending webmentions, receiving webmentions and displaying received webmentions. While this might look like one thing, they are actually very different. Some of the troubles I’m having with my new webmention plugin are related to wanting to do too much (all the three things).

Secondly, your question is also about how to get webmentions from social media to your site, which is an entirely different topic.

I’m going to mention my new webmention plugin a few times, but don’t expect it to be ready anytime soon.

Sending

So the webmention sends webmentions (which is a POST request, kind of a notification) to URLs you mention. In my fork, you can set some fields to look for URLs to ping, but in the original it only looks in the text field of your page. It sends those webmentions on the first page-view, when you call the webmentions helper function.

So, if you post a post, look at it, and then edit it, it will not pick up new URLs. To trigger sending webmentions again, go to the folder of your post in /content/, look for the .mentions-folder and delete pings.json. When you visit the page and it has no pings.json, it will send webmentions.

For this to work, you also need to add echo webmentions() to your template, as you said you did. This will check the pings.json and send the mentions.

(My intention is to give some webmention sending UI in the panel. I have not yet decided how.)

There is also the microformats-problem, see below.

Receiving

The plugin sets up a webmention endpoint, which is needed to receive webmentions. The link in the header points webmention-senders to the right endpoint. Once you set up that header, it should just work.

The original plugin is having troubles with pages that are found through a custom route (it does not use the router at all), and my fork uses a hacky way to find the right page-object. If you have troubles with receiving webmentions for pages on custom routes (they should show up as separate files in the .mentions-folder within the page’s folder), please check out my fork.

(My intention is to set the header via PHP’s header()-function, so you don’t have to add any HTML. Finding the right page could also be solved by setting a different endpoint for each post. There are some problems to solve here.)

Displaying received webmentions

The plugin also displays received webmentions, on the place where you call the helper-function in the template. (So, that helper-function has two jobs, which is probably not the best.)

My fork supports adding snippets to your own folder, so you can overwrite how the mentions are displayed.

My new plugin

I kind of put my work on a new plugin off, since there is a new Kirby coming, and I noticed that the router is going to change. Finding the right Page-object from the URL is a bit hard at the moment and it seems that Kirby 3 will solve some of it, so it feels better to wait and see. Then again: Kirby 3 might still take a while, and it would be nice to have a better working plugin for Kirby 2 already.

Likes from Twitter on your own blog

Let’s face it: there aren’t that many webmention-sending social media at the moment. In order to receive a webmention, someone has to send it.

You can use the service Bridgy to receive likes from Twitter, Instagram and Facebook and the like. Bridgy sends you webmentions for all the likes and has a very detailed about page.

Likes from your blog to another blog (the Microformats problem)

To send a webmention, your site needs to link to another site, and that is where webmention as a protocol ends. But in order to display an external post as a like, a reply, a repost, etc., you need some kind of markup.

This markup (Microformats’ h-entry) needs to be added to your template. Since every template is different, it is hard, if not impossible, to add this via a Kirby Plugin. Personally I see this as one of the weak spots of webmentions, because it is not part of the webmention itself, but essential for what people think of as ‘webmention’ to work.

(At this moment, the Kirby Webmentions plugin rejects webmentions without Microformats-markup and sees them as spam. My new one would probably follow the webmention-spec more, and not rely on this markup. A non-marked-up mention can still be displayed as just a link of a page that links back.)

Speaking of spam

I want my new plugin to support vouch too, because right now webmentions are free from spam thanks to not being very known, not because the protocol is super safe against spam. Would be nice to support some deletion / moderation in the panel as well.

(As you can see, I want a lot from that new plugin.)


Anyway, long answer, hope I got some of your questions answered. If not: please ask!

For chat about the Indieweb you can join on IRC or Slack: http://indieweb.org/discuss
I’m sebsel over there :slight_smile: and seblog.nl is my Kirby powered (but somewhat customized) IndieWeb-site.

1 Like
#4

Hey @seb, thanks for responding so fast and your very detailed answer :slightly_smiling_face:.

1 Like
#5

thanks for your thoughout answer,

one thing left open for me still is:

other than using webmention in kirby… what other platforms or cms’es support them.

e.g. someone else runs a blog on ghost (let’s say there is no webmention support there) so even if he mentions and puts an url to one of my contents, it wouldn’t ping back towards my site which obviously doesn’t generate a webmention on my site.

so what are the chances it’s actually producing any results on each site?

#6

Good question.

Currently, there is not much support out of the box, although plugins are available for most CMS’es. From the platforms I know Known and Micro.blog support webmention, and through Bridgy, as I mentioned, you can get responses on your Tweets, Instaphoto’s etc.

If someone posts a mention of a post of you on their site (so they link to the URL, nothing more), then Webmention will not help you discovering it. Once you do discover it, you can send a webmention to yourself. (I have a form underneath all my posts to do this.) That Webmention will be valid, because everyone can send a webmention for any URL to any URL, as long as the source links to the target. It nothing more than a POST-request / notification, saying 'hey, you can find some reply on this URL.

Unfortunately, like I said earlier, the Kirby Webmention plugin would reject these mentions as spam if they do not contain Microformats. I should fix that.

So, any results:

  • if no-one sends a webmention, there will be no result
  • if someone discovers a link and send a webmention, there will be a result (and this someone could be you, them, or a third party, but there are no third parties that do this right now)
  • in any case, there will be no result on the source, because that’s just a page that links to your site (the target)
#7

meh. i thought it would be more like

  1. site gets shared on social media (twitter fb instagram whatever)
  2. webmention recognizes and publishes saying "XX shared/liked /commented

or:

  1. someone would write his own blog linking towards target url
  2. webmention recognizes and publishes saying "XX mentioned [some short quote here] on his blog at

so more like everything is 100% automatic.

#8

Well, the second thing actually looks a lot like what webmention does. The only difference is that the publisher should also support webmention for it to work.

If there was a Kirby Plugin that would discover external links, it would need to scrape the web by itself, discovering new blogposts. Since the web is quite big, that’s just not possible. One could use a service like Google (they are already trying to scrape all the web, as you may know), but that’s not what webmention is about.

But when both parties support webmention, yes, this is 100% automatic.

#9

i wish everyone would support webmention then … :slight_smile: