Webmention support
I've known about webmentions for years, as well as microformats; I've even included microformats in my markup for probably close to a decade at this point. But accepting and sending webmentions, while it seemed like a great idea, just never really made it to my priority list.
Until it did.
Inspired by and , I started investigating how to implement webmentions, and ended up going down the rabbit hole myself.
There has long been a PHP API for Microformats (php-mf2). It's not been updated in 4 years — largely because it's complete — and uses PCRE for finding microformats and validating URIs. Here's the thing: the last two releases of PHP (8.4 and 8.5 at the time I write this) have included some amazing features that make things like this both far simpler and more accurate. These include the new HTML5 parser included in PHP 8.4 — which even provides querySelector() and querySelectorAll() implementations — and the Uri extension included in PHP 8.5, which provides robust, standards-based URL parsing and validation.
Add in things like PSR-18's HTTP Client, and it seemed possible to create a pretty minimal library that gives full-featured support for both microformats and webmentions.
So, I decided to try my hand at it.
I'll likely open source the libraries I created (one for parsing microformats, another for sending and receiving webmentions), but I want to wait until I've ironed out any edge cases. While I've tested against the various resources that webmention.rocks provides, as well as the microformats website, I'm sure that I'll be observing some oddities in the wild. But I have webmention receiving in place, with microformats discovery for identifying the type of webmention sent to my site. I have also setup a post-publication process for parsing my own content for links, and performing webmention discovery and sending. I want these all to run for a while to find what is working and what isn't in the real world.
In the meantime, feel free to send webmentions to my blog posts, art gallery images, or Now pages. Just like my comments, I moderate all webmentions before publishing them (someday I'll blog about how I accomplished that as well).
Update
I immediately discovered an error in how I was combing my own content for potential links to which to send webmentions when I first published this! Hopefully I have that corrected now, and folks will get some mentions from this post!