I've now implemented a way to download mentions from Webmention.io and display them on my blog posts.
My blog is a static site. So the way it works is that I download mentions via the Webmention.io API. Then I extract only the information that I need to display the mentions on my blog. I save that information in json files that I can read when the website is generated. Right now, they look like this:
$ cat posts/2023/04/06/what-should-a-ci-server-do/mentions.json | jq
{
"https://blog.rickardlindberg.me/2026/01/24/how-does-ci-work-in-projects2.html": {
"wm-property": "mention-of",
"wm-received": "2026-02-04T19:41:15Z"
}
}
. (also on IndieNews)
Here is how I test microformats markup on my website.
First I install mf2py:
sudo dnf install python3-mf2py
Then I define this one-liner Bash function:
mf2test() { python -c 'import sys; import mf2py; import json; print(json.dumps(mf2py.parse(url=sys.argv[1])))' $1 | jq; }
And then I can test a website like this:
$ mf2test https://blog.rickardlindberg.me/2026/02/05/075110.html
{
"items": [
{
"type": [
"h-entry"
...
. (also on IndieNews)
. (also on IndieNews)
. (also on IndieNews)
What is Rickard working on and thinking about right now?
Every month I write a newsletter about just that. You will get updates about my current projects and thoughts about programming, and also get a chance to hit reply and interact with me. Subscribe to it below.