惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Vercel News
Vercel News
F
Fortinet All Blogs
月光博客
月光博客
G
Google Developers Blog
博客园 - Franky
GbyAI
GbyAI
The Cloudflare Blog
I
InfoQ
雷峰网
雷峰网
WordPress大学
WordPress大学
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
小众软件
小众软件
腾讯CDC
B
Blog
量子位
V
V2EX
S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News

Matthias Ott

Hello Again, World This, Still Not for Everyone The Shape of Friction WeissKlang L1 – Punching Above Its Weight Continvoucly Morged Value Webspace Invaders To Affinity and Beyond The Mystery of Storytelling Amateurs! Echoes of Connection Linear() Is Not (That) Linear View Transitions: The Smooth Parts Adding AVIF and WebP Support to My Craft CMS Site Challenge Acoustic Room Treatment and Building Sound Panels, Part 1: Planning Play On Overshoot The HTML Output Element Listening Closely Compressed Fluid Typography The Lifeblood of the Web What Could Go Wrong? That’s My Rank Making Space CSS :is() :where() the Magic Happens Visual Regression Testing for External URLs With Playwright Jane Goodall’s Famous Last Words European Tech Alternatives 🇪🇺 Independent Type Foundry Advent Calendar – Day 24: NaN Independent Type Foundry Advent Calendar – Day 23: Typotheque
Webmention for Craft CMS 5 · Matthias Ott
Matthias Ott · 2025-03-13 · via Matthias Ott

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.

Webmention plugin icon on light background
Webmention plugin icon on dark background

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. 🤗

~