DEV Community

Cover image for Bringing your site to the Fediverse: A practical guide for static sites - Part 1
Maho Pacheco
Maho Pacheco

Posted on

Bringing your site to the Fediverse: A practical guide for static sites - Part 1

I spent the last couple of weeks getting this blog onto the social web (aka fediverse), investing an hour here and there (I hope you are reading this from Mastodon, btw). It was fun and a very exciting learning experience, and I want to share not only my reflections but also create a guide so others can do the same, to move the needle a little bit in the right direction.

First of all, ActivityPub is a very nice idea; I love how much it has grown and the adoption that is growing day by day. I am not an expert in ActivityPub; I am far from being one. My only technical experience can be counted in literally ten days since this first post. But I have grown fond of it, and I am now #TeamActivityPub. So much so that I want to explain to others how to achieve the same on their own sites.

But before explaining how to do it, I want to share my vision of why you should do it. (If you have already decided to do it, you may skip this part).

You may have heard all these nice things about the indieweb, the bad corporations, and privacy. And I agree with almost all of them, but there is also the aspect of innovation which not many times is covered. ActivityPub, the Fediverse, or the SocialWeb are enablers of innovation, and we should make sure others see it. If you want to create a new app, a new social network, or a new product, you don't need to start from zero to build a user base (or what is harder, a community); you can (and should) just focus on building that thing that adds value.

Bear with me; this is important to explain how to implement ActivityPub on your website. (Because at the end we are not going to implement the whole ActivityPub protocol, just the parts that make sense for you).

As you already know, Mastodon is a microblogging platform, a clone of Twitter, but the underlying protocol/technology, ActivityPub, is much more than that. It describes concepts that repeat in almost all social networks:

  1. You can create content, described as a note.
  2. You have an identity, or user.
  3. You can follow and unfollow other users or people.
  4. You can "like" and "reply" to other content.

There are others, but these base 4 concepts repeat themselves in each social network, no matter if it's MySpace, LinkedIn, or TikTok. These features have been implemented over and over, since Google+ and Orkut where a thing.

That is why ActivityPub is the base of other implementations besides microblogging; take as examples Lemmy (a Reddit clone) and PixelFed (an Instagram clone). They look very different from Mastodon, but they are interconnected (aka federated). This means that I can follow a community from Lemmy, not only with my Mastodon account, but with my Mastodon app. It may be that when I favorite a Lemmy-created link in Mastodon means no more than a thumbs up (for Mastodon), but for Lemmy (remember, a Reddit clone) it can be used to upvote a post. Or a photo of a cat on Mastodon could just be yet another post, but it could be beautifully presented on Pixelfed. I personally want to see the GitHub feed to federate in the socialweb (maybe someone can help to it in GitLab).

But also you do not need to reimplement ActivityPub to create some new instance on a server; you can just consume the APIs on the client side. I can create my own For You algorithm, an app for weather alerts, or a news aggregator (like Google News). Flipboard is a content curation site, for example, and it is interconnected with the socialweb.

And this leads me to your blog, a newsletter, or news site, which also:

  1. Publishes content.
  2. Has an identity or multiple (for example, a news site could have @tech@nytimes.com, @politics@wsj.com, etc.).
  3. You can subscribe to a blog or newsletter (follow/unfollow).
  4. You can "like" or "comment" (reply).

Which btw, there is nothing on ActivityPub that says you cannot make your subscriptors (followers) paid-only, a follow request can be accepted after you verify any sort of payment. But the point is that imagine that you won't need to create yet another account on each newspaper to be able to discuss or comment on their content. Or that you don't need to create an account on Substack to follow an author. Or that you don't even need to create a user on Google or Facebook to like a photo.

That is what ActivityPub, the Fediverse, and the Social Web bring: interoperability. This can go further, as in distributed dentity verification (you'll be able to own your identity across instances), but that is another topic. For now, I want to convince you that if you have a site that publishes content, it should be in the Fediverse and Social Web. If not for principles, for numbers: there is already 2 million active users every month can read, consume, and engage with your content. You don't need to create a user base, the user base already exists.

It appears that WordPress, Medium, Threads, Flipboard understood this, and with their actions, they are helping to convince others that this is no longer just an ideological matter but a practical one. There are some people who said this may not succeed, but what I have seen is that it has already done.

It may not go mainstream to replace Twitter, but that is not the purpose of the Fediverse. That is not the real question. The question is: how can we harness the power of interoperability to enhance accessibility, engagement, and inclusivity within our online communities and content distribution platforms? By integrating with ActivityPub and embracing the principles of the Fediverse and the Social Web, we open doors to a vast network of users who can seamlessly interact with our content without barriers such as mandatory account creation or platform restrictions.

Moreover, we contribute to the democratization of online spaces, allowing individuals to maintain control over their digital identities and fostering a more decentralized and open internet ecosystem. This not only benefits users but also offers significant advantages for content creators and publishers, as it expands their reach and facilitates meaningful interactions with their audience.

In essence, the question is not whether the Fediverse will replace mainstream platforms but rather how we can leverage its potential to create more inclusive, user-centric online experiences that prioritize accessibility and collaboration. This is the promise of the world-wide-web, interconnected websites, but also interconnected people. And if you site is not part of it, well, then keep reading.

You can find the series here or in my substack and follow the blog (@blog@maho.dev) in the Fediverse/SocialWeb!

Top comments (0)