Kirby Komments Plugin

Kirby

For some time now, you can leave comments on my site. After some development time I recently published my solution for that as a Kirby plugin.

I was missing the possibility for adding plugins to my site without using an external service, for some years now. So I started writing my own plugin. There already is a Plugin by Sebastian Greger where I shamelessly stole some ideas and code snippets 🙈 (I hope Sebastian isn't angry with me). But I had some ideas and problems I couldn't solve with that plugin.

Komments - my new plugin

Komments is the name of my new plugin. And I want to write a short post on some of my thoughts and how this plugin is related to my other kirby plugins.

Comments

Well, obviously I wanted to have comments on my site. This is now possible using this new plugin. There is a simple comment function with a also very simple spam detection. So, you can now write comments.

Webmentions

I also wanted to be able to send and receive webmentions. This currently only works with webmention.io. My plugin is able to do so. Thanks to some services I am now able to post a link to this page on twitter or mastodon and to get the feedback from those platforms back to my page (as comments). So if you answer on my tweet related to this post, your answer will end here as a comment.

Special stuff

Before creating an official plugin, I used an internal version of this plugins for some time on my site. During that time I added some more functionality which normally aren't part of such a plugin. So for example, when you publish a page, the plugin can send a toot with a link to mastodon. Also I inform archive.org. I also wanted to be able to disable comments per page.

Why something new?

I had some ideas for my site and I wasn't able to solve them with existing plugins. Next to "normal" comments, I wanted to show ratings. You can give positive or negative feedback on this page below. I wanted to handle those ratings with a separate plugin. But I also wanted those ratings to react to webmentions. So if a like is being received via webmention, I wanted the rating plugin to increase the numbers.

The problem is, that there can be only one webmention endpoint. But with the ratings AND the komments, if have two different plugins needing an endpoint.

My solution was a third plugin wich I published some time ago: Tratschtante. The plugins listens to the webmention endpoint and then distributes the data via a hook. Other plugins can listen to that hook, grab the data and do whatever they want with it. So if you use Tratschtante you can receive webmentions and any plugin could listen to Tratschtante and will get the data (in a normalized format) and can react according to its function.

The result: A twitter like will create a thumb up at the rating plugin and also a new comment with the komment plugin.

Future plans?

I have some more - more or less visible - functions on this site, which I want to publish as a plugin. Those will use Tratschtante and other interfaces to work together.

For the komment plugin there will probably be some more fixes and customizations in the future. It's in beta currently, but I am using it for quite some time now on this page, so I think it runs pretty stable.

I also want to extend panel support and clean up the panel view a bit. And I bet spam detection will be an ongoing topic.

What you could do now

If you (don't) like this post, you can comment, write about it elsewhere, or share it. If you want to read more posts like this, you can follow me via RSS or ActivityPub, or you can view similar posts.