Oh, there are a lot of sides to this question 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 and seblog.nl is my Kirby powered (but somewhat customized) IndieWeb-site.