In Part 2, we will delve into the design of my implementation. If you want to read about why you should bring your site to the Fediverse, check out Part 1. You can also navigate the other parts of this series here.

So, you’ve decided to bring your blog to the social web, the Fediverse. That’s cool! This guide might be just what you need. And if you’ve got this or any other method working, shoot me a message on the social web, and I’ll gladly follow. But first, a word of caution: if you’re considering adding ActivityPub to your static site (or any site), I strongly suggest you look for existing implementations that could make your life easier:

None of these alternatives were enough for me because they didn’t fully cover my constraints/goals:

(Bridgy-Fed came very close).

So, buckle up. This is how to implement ActivityPub on your almost static site. My blog is powered by Hugo, and deployed to Azure, but this should work with other cloud providers and other static site generators.

This is how my resources look:

Resources design

Most of the lines represent soft relations. If you feel overwhelmed, don’t worry; I will explain in detail.

The Azure Function can be an AWS Lambda, or a Raspberry Pi running in your garage. All other resources are just static files that, in my case, live in Azure Blob Storage, but they can live anywhere, like AWS S3. Btw, there is no reestriction on the domain of this endpoint, it does not need to be the same as the one from your site.

All these resources allow you to do the basic four things explained in the previous post of the series:

  1. Be discovered in the Fediverse as an account.
  2. Be able to be followed/unfollowed.
  3. Generate and federate/broadcast posts to your followers.
  4. Be able to receive replies to a post.

To get this done, I experienced the frustration of testing so you don’t need to do it. I even set up my own Mastodon instance just to test. So, I’ve divided this guide into those four topics: discovery, follow, broadcast, and replies.

In the next blog post, I will explain how to make your static site be discovered in the Fediverse. If you’re interested, follow @blog@maho.dev in the Fediverse and let me know what you think!