Twitter used to have a really convenient way to embed a feed into your website, but now Twitter is dead.

Emfed is a simple, in-browser way to embed Mastodon feeds into webpages. To make a feed like the one on this page, you use simple markup like this:

<a class="mastodon-feed"
   >follow me into the Fediverse</a>

Then include the JavaScript:

<script type="module" src="https://esm.sh/emfed"></script>

Optionally, consider adding the stylesheet (or otherwise just style it yourself, however you like):

<link rel="stylesheet" type="text/css"

One place you can see Emfed in action is at the beets project. The code is dedicated to the public domain. For more details, check out the README.