Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluesky embed support #40153

Open
jerclarke opened this issue Sep 19, 2024 · 3 comments
Open

Bluesky embed support #40153

jerclarke opened this issue Sep 19, 2024 · 3 comments

Comments

@jerclarke
Copy link

Description

It seems that embeds from Bluesky don't work in AMP.

To my eye, it looks the embed functions similarly to x.com, with a generic blockquote followed by a <script> tag that converts the blockquote.

https://bsky.social/about/blog/post-embeds-guide

AFAIK, AMP supports x.com embeds through a custom script or module or whatever, so I suppose the same would be needed for Bluesky.

I'm creating this ticket because I can't find any reference anywhere to this question, and figured I'd start at the source. Bluesky only seems to have added this embed support in April 2024, so it's very recent.

I am using the amp-wp plugin, but my experience in the past was that support for these weird embeds starts at the top, so I figured I'd start here.

Example code:

<blockquote class="bluesky-embed" data-bluesky-uri="at://did:plc:5x3a6jke5p3ni7mnpd57ijhw/app.bsky.feed.post/3k326ce3fxn2n" data-bluesky-cid="bafyreicmovlmmh7hfcocvj66r73s7u4zz5wfpq225y64asqkwqfblflb54"><p lang="en">Hello 👋🏻 https://globalvoices.org/about/<br><br><a href="https://bsky.app/profile/did:plc:5x3a6jke5p3ni7mnpd57ijhw/post/3k326ce3fxn2n?ref_src=embed">[image or embed]</a></p>&mdash; Global Voices (<a href="https://bsky.app/profile/did:plc:5x3a6jke5p3ni7mnpd57ijhw?ref_src=embed">@globalvoices.bsky.social</a>) <a href="https://bsky.app/profile/did:plc:5x3a6jke5p3ni7mnpd57ijhw/post/3k326ce3fxn2n?ref_src=embed">July 21, 2023 at 9:39 AM</a></blockquote><script async src="https://embed.bsky.app/static/embed.js" charset="utf-8"></script>

Alternatives Considered

If it was an <iframe>-based embed, I'm pretty sure it would just work, but it's not.

I tried it in WordPress both by pasting the code into the HTML editor, and using oEmbed by just pasting the URL. In both cases it worked in my non-AMP version of the site, but not in my legacy AMP template served by the amp-wp plugin.

Screenshot 2024-09-19 at 12 39 29 PM

Additional Context

No response

@Siddharthgup
Copy link

Hi @jerclarke, I would like to contribute can u assign this task go me ?

@jerclarke
Copy link
Author

@Siddharthgup I have no authority to do anything as far as I know, I'm just a third-degree user of AMP hoping this feature comes to pass.

@erwinmombay
Copy link
Member

thanks @jerclarke for opening an issue. This seems pretty easy to implement. We'll triage and look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants