astro-embed
astro-embed copied to clipboard
Add Mastodon support
Description
- Closes #76
This PR adds support for embedding posts from Mastodon.
The content is fetched using the Mastodon API as discussed due to the fact that the Mastodon oEmbed API only returns an iframe and a script tag.
It currently supports the following feature:
- Rendering toots from Mastodon
- Rendering toots preview cards with and without images
- Rendering
image,video,gifvandaudiomedia attachments - Rendering custom emojis in a toot or in a username
- Rendering RTL toots
The PR is a draft as it still needs some work to be done and some questions to be answered:
- Probably tweak the UI a bit as it's mostly a basic copy of the Twitter implementation so far
- Maybe adding some sort of max width to cards, not sure how it's usually done or if it should be up to users.
- Figure out if I forgot some features as I'm not a Mastodon user at all
- Figure out if we want to support loading Mastodon's JavaScript like Twitter
- This would not be as easy as with Twitter considering Mastodon's JavaScript explicitly expects an
iframewith themastodon-embedclass
- This would not be as easy as with Twitter considering Mastodon's JavaScript explicitly expects an
- Add changesets
⚠️ No Changeset found
Latest commit: 94e3d69f71d317f219b0b3b12953ec0372f5def9
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Deploy Preview for astro-embed ready!
| Name | Link |
|---|---|
| Latest commit | 94e3d69f71d317f219b0b3b12953ec0372f5def9 |
| Latest deploy log | https://app.netlify.com/sites/astro-embed/deploys/66cc8aba779fed00070ee43d |
| Deploy Preview | https://deploy-preview-140--astro-embed.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.