All it takes is a single javascript file & one new element in your markup to embed any fediverse feed you want!
- Add the javascript file (< 2kb) to your page.
- Place the element in your markup.
- Add a user's rss link to the
data-source
attribute - Optionally set
data-timeout
with a number value to prevent re-fetching for that many seconds (default 600s)
- Share the fediverse on your site!
<html>
<body>
<!-- Get a user's latest posts -->
<fed-embed data-user="https://mastodon.social/@mastodon"></fed-embed>
<!-- Get a specific post -->
<fed-embed data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed>
<!-- Note the version number in the URL -->
<script src="//cdn.jsdelivr.net/gh/andy-blum/[email protected]/dist/fed-embed.min.js"></script>
</body>
</html>