Federating the blog
Apr. 13th, 2023 05:20 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
As you know, this blog is hosted on my own domain and cross-posted to Dreamwidth. And, this being WordPress, there is also an RSS feed that you can use to keep up with the blog.
But these are not the only game in town these days, and the surge in popularity of Mastodon and other federated social media (collectively called ‘the fediverse’) is another way to distribute your content. The underlying protocol is ActivityPub, and there is an official plugin for WordPress to connect your blog to the fediverse. That means that users of Mastodon or other ActivityPub-enabled software can subscribe to your blog and get the articles (or links) in their feed.
So of course I installed it. The main part is the ‘webfinger’ script that connects someone searching the fediverse for a specific account to the actual account. Searches are conducted on the root of the webserver, but since I have my blog in a subfolder, I had to wriggle some things to forward a search to the plugin. Luckily I already had something in place for that — a little trick that means that if you search for an account with my email address, you end up on my actual Mastodon account. I extended this script to forward any queries about the blog to the plugin.
The name used for the account is [username]@[domain]. I didn’t like the username it used by default, so I created a new user so that the username to search for is ‘fublog@ragas.nl’ and you should end up on the blog.
This is the first post with that configuration all set, so if it works correctly, this will end up in my Mastodon feed too.
Crossposted from my blog. Comment here or at the original post.