A highly customizable, lightweight mastodon feed embed component
All it takes is a single javascript file & one new element in your markup to embed any fediverse feed you want!
data-source
attributedata-timeout
with a number value to prevent re-fetching for that many seconds (default 600s)<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>