Webmention for Craft CMS 5 Posted March 13, 2025 by Matthias Ott 29 Webmentions #Craft CMS #indieweb #plugins #webmention Imagine my surprise, when, roughly two weeks ago, I received a direct message on Mastodon from Brandon Kelly, the founder and head of the team behind Craft CMS, opening with: 👋 I spent today working on a Craft 5 port of your Webmention plugin. My Webmention plugin? The one I always meant to rewrite? The one that was still stuck on Craft 2? The very reason why my personal site was missing all Webmentions after I had upgraded to Craft 5 towards the end of 2024? Yes, that Webmention plugin. So, naturally, I was thrilled! What followed were several days messaging back and forth with Brandon on Discord, fixing bugs, testing Webmention sending and receiving, tweaking and optimizing features, while Brandon basically rewrote all the parts necessary to bring the plugin over to Craft 5 – and added other substantial improvements. And so, after about two weeks, an updated version of the plugin is now available for free on the Craft Plugin Store: Webmention for Craft CMS 5 🎉 The most significant – and breaking – change is Craft 5 compatibility, obviously. And, of course, the plugin retains its core functionality of sending and receiving Webmentions on your personal site: it will send out Webmentions for all links included in your posts and add a Webmention endpoint to receive mentions from others. But there are many more improvements under the hood that make this version 1.0.0 already much more robust and convenient than the previous version. A few highlights: # Webmentions now not only store the target URL but are actually tied to the Craft element they belong to. This makes it much easier to retrieve Webmentions for individual entries, like blog posts, but allows for changing an entry‘s URL without breaking the connection to its Webmentions. And it also opens up new possibilities for future plugin improvements. In the control panel, it is now possible to manually trigger an update of individual Webmentions. Also, the list view of all Webmentions now contains direct links to related posts. Another huge improvement is that avatars are now Craft assets. So instead of just dumping them into a folder, avatars are now stored as proper assets that can be image-transformed and are eager-loadable – which means substantial performance improvements for posts with a larger amount of Webmentions. Ahem. We also added new behaviors that allow for convenient fetching of all Webmentions for an element: {% for webmention in entry.getWebmentions() %} … {% endfor %} And if you want to fetch only Webmentions of a certain type, like comments, likes, or reposts, you can call getWebmentionsByType() on the element. What also needed fixing was a tricky regular expression used to identify links in entries, especially when those URLs are wrapped in the parentheses of a Markdown link. And we updated how the plugin handles Webmentions coming from social media platforms via Bridgy: Webmentions from Mastodon, Bluesky, GitHub, and Reddit are now stored with the correct site type. And, and we’ve given the plugin a fresh new icon, inspired by Paul Robert Lloyd’s IndieWeb building block icon designs. Overall, I’m incredibly happy with the result and I can’t thank Brandon enough for bringing this little project back to live. Not only does it feel good to finally see Webmentions again on this site. It is also a fantastic opportunity to develop the plugin further and explore how Webmentions can work even better on personal sites. There are still a lot of things that would be interesting to try out next. How replies and replies to replies could be displayed in a more chat-like view, for example. Or how to auto-populate your site with all Webmentions you’ve already received in the past via Mastodon, Bluesky, et al. Or, how the plugin could potentially handle GDPR-related issues around consent and storing and displaying personal information better – a concern a lot of people have raised in the past regarding Webmention. Which brings me a few important questions: What would you like to see in future versions of this plugin? What is missing from Webmentions to make them a really great and valuable experience? And, in case you install and try out the plugin yourself, did or did not yet work for you? We’d love to hear all that. So, in case your site is running on Craft 5, install the plugin and let us know where we can do better, for example by filing an issue. You will find all necessary information on how to install and configure the plugin in the documentation in the project’s GitHub repository. We hope you like it. 🤗 ~ 29 Webmentions Patrice Calligaris 14 March 2025 | 00:13 Have you tried ExpressionEngine? a great alternative too. I tried CraftCMS but I still think they have a lot of design issues. 16 March 2025 | 23:03 7 Reposts Kai Klostermann 14 March 2025 | 08:42 Craft CMS 14 March 2025 | 08:42 Brandon Kelly 14 March 2025 | 08:42 Brandon Kelly 14 March 2025 | 16:10 Craft CMS 14 March 2025 | 16:10 CraftEntries 14 March 2025 | 16:10 Matthias Andrasch 14 March 2025 | 16:10 20 Likes Flo Kosiol 13 March 2025 | 19:00 Zuba :laUrsa: :HomemMeiaNoite: 13 March 2025 | 19:00 Agyei Gyasi 13 March 2025 | 19:00 Jérôme Coupé 14 March 2025 | 08:42 Kai Klostermann 14 March 2025 | 08:42 Brandon Kelly 14 March 2025 | 08:42 Eric Portis 14 March 2025 | 08:42 Simon Cox :SEO: 14 March 2025 | 08:43 Jay 14 March 2025 | 08:43 Dennis Frank 14 March 2025 | 08:43 Alistair 14 March 2025 | 08:43 Tommi 🤯 14 March 2025 | 08:43 Nick F 14 March 2025 | 08:43 Saaste 14 March 2025 | 08:43 Matthias Andrasch 14 March 2025 | 16:09 Bernard Nijenhuis 14 March 2025 | 16:10 Brandon Kelly 14 March 2025 | 16:10 Will Browar 14 March 2025 | 16:10 Mats Mikkel Rummelhoff 14 March 2025 | 22:08 Monica 16 March 2025 | 15:51 ⓘ Webmentions are a way to notify other websites when you link to them, and to receive notifications when others link to you. Learn more about Webmentions. Have you published a response to this? Send me a webmention by letting me know the URL. Ping! More Notes Ad Infinitum Lazy and Prompt Buckle Up At Machine Speed
Patrice Calligaris 14 March 2025 | 00:13 Have you tried ExpressionEngine? a great alternative too. I tried CraftCMS but I still think they have a lot of design issues.