Technically Feasible

Webmention & WebSub

Likeness of Michael Oldroyd
Michael Oldroyd

Webmention Support

I've added webmention support through webmention.io. The service is configured to receive webmention requests and store them. They won't yet be displayed in any way, but I will at least be aware of any conversations around the content I publish from compatible web citizens.

How could we store and implement webmention into the 11ty workflow? As this site is statically generated, it doesn't have a database. I guess commentary could be progressively enhanced, or we could consider some form of datastore. Another option is json data files. If each post is contained within it's own folder, you can drop in a file with the name of the folder;

.
└── posts
    └── a-great-post
        ├── a-great-post.json
        └── index.md

We can then populate this file with some webmention data;

{
"webmentions": [
{
[]
}
]
}

The payload would need to be atomic to avoid performance concerns. I'm not entirely sure how you go about removing content yet, other than deleting from the JSON file. Also not sure how we go about populating the webmention data into the data file. This may well be re-imagined once things become clearer.

Limited WebSub Support

I have added support for WebSub through the superfeedr.com service. This is limited as I had to hard-code update notifications on the RSS feeds within the CI pipeline. This was added by modifying the feed output;

<feed xmlns="http://www.w3.org/2005/Atom">
<!--[…]-->
<link href="[https://oldruk.superfeedr.com/](https://oldruk.superfeedr.com/)" rel="hub" />

It also required updates to the GitLab CI pipeline;

websub:
stage: notify
script:
- curl -d 'hub.mode=publish&hub.url=https://www.michaeloldroyd.co.uk/feed/feed.xml' https://oldruk.superfeedr.com/

This allows subscribers to receive update notifications in near real-time, rather than polling the feed.

Image of me

Michael Oldroyd

Michael is a Software Engineer working in the North West of England. Michael spends his days building hand-crafted PHP applications. Rumours of his super-hero status are currently unconfirmed. He savours his victories when solving difficult programming challenges; occasionally writing about them here, on his personal blog.