DEV Community

Cover image for Feature update: Rich Content Embeds
Arit Developer for The DEV Team

Posted on Edited on

Feature update: Rich Content Embeds

Hello DEV Community!

I'm excited to announce a significant improvement in how we embed rich content (such as Tweets and Youtube videos) in Forem posts and comments.🎉

Now, you need just the embed keyword and the complete URL of the resource:

{% embed https://... %}
⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini ⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini

Prior to this change, we embedded rich content by using keywords specific to the type of embed being created. For example, to embed a GitHub repository, we would use the github keyword and the slug to the repository:

{% github forem/forem %}
⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini ⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini

With our new approach, all you need is the complete URL to the repository:

{% embed https://github.com/forem/forem %}
⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini ⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini

Our Editor's Guide contains a list of supported content types. Note that embeds that were created using the former approach will still work for now. Eventually, the former approach will be deprecated.

Do jump in and try this new rich-content embed approach out! Please report any bugs you may encounter - thanks!


Originally published on Forem.dev.

Top comments (17)

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
michaeltharrington profile image
Michael Tharrington • • Edited

In celebration of this update, I'm gonna embed something here:

I've been really digging this song this AM. 😁👇

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
atulcodex profile image
🚩 Atul Prajapati 🇮🇳 •

oh you just tested this new feature :)

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
ben profile image
Ben Halpern The DEV Team •

Arit, you crushed this.

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
aritdeveloper profile image
Arit Developer •

Thank you Ben!

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
andypiper profile image
Andy Piper •

Cool! Thanks for the update! Will we need to update any older content (since the former approach will be deprecated in the future), or will that be handled for us?

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
aritdeveloper profile image
Arit Developer •

You’re welcome Andy!

Great question! While we have not decided, we will most probably handle the updates of v1 embeds ourselves.

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
andypiper profile image
Andy Piper •

Do the new embeds have a way to hide the GitHub README to make the embed more compact? In the other Liquid format, it worked to add noreadme to the tag.

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
aritdeveloper profile image
Arit Developer •

Thank you Andy. Would you please open a ticket for this?

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
andypiper profile image
Andy Piper •

Issue #16673 👍

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
siddharthshyniben profile image
Siddharth •

Wait – I already found a bug lol

{% embed https://google.com/ %} doesnt seem to work

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
aritdeveloper profile image
Arit Developer • • Edited

Hello @siddharthshyniben, the link you used is not currently supported.

You can find a list of currently supported embeds here: dev.to/p/editor_guide#liquidtags

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
rolandixor profile image
Roland Taylor •

Very handy! Thanks!

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
thomasbnt profile image
Thomas Bonnet •

Ooooh coooool 🥳🥳🥳

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
metacollective profile image
metacollective •

Hey Arit,

This is brilliant! Thanks for letting us know. Now, all I have to do is find a way to get it into my next post ;)

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
rsidhhvin profile image
Kevin Costa •

Thanks for the information!

⭐ Football Update: devteam/feature update rich content embeds e - Pertandingan Hari Ini
 
gwigwam profile image
GWigWam •

But what does this mean for user privacy? Won't this enable these companies to do cross-site tracking?