A component for Astro to embed Mastodon posts in your website.
MIT License
An Astro component for embedding Mastodon posts in your website.
This is very much a work in progress, and not at all ready for production.
In your Astro project, run the following command:
npm i astro-mastodon-embed
In your Astro or MDX file:
import MastodonEmbed from 'astro-mastodon-embed'
The MastodonEmbed component just needs a URL for the post you want to embed.
<MastodonEmbed url={yourUrl} />
By default, the component is in light mode. You can enable dark mode by passing the prop variant="dark"
:
<MastodonEmbed url={yourUrl} variant="dark" />