Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion src/pages/blocks/embed/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,38 @@ description: Learn how to use the Embed block to integrate videos, social media

# Embed Block

The Embed block allows you to display videos and social media posts directly on your page. It supports a variety of platforms and media types, automatically selecting the appropriate player based on the provided URL.
The Embed block allows you to display videos and social media posts directly on your page. It supports a variety of platforms and automatically selects the appropriate player based on the provided URL.

## Syntax

Standard video

```markdown
<Embed slots="video" />

https://your-media-link.com
```

Short-form video new

```markdown
<Embed slots="video" short="true"/>

https://your-media-link.com
```

## Parameters

- **slots**:
- `"video"` - A slot for the URL of the media you wish to embed.

- **short**
- `"true"` - An attribute displays the video in a short-form (vertical) format, similar to YouTube Shorts or Instagram Reels.

<InlineAlert slots="text" />

When using a `youtube.com/shorts/` URL, the block automatically detects it as a Short. Use `short="true"` explicitly when the URL does not include `/shorts/` in the path.

## Supported Platforms

The block automatically detects and handles links from the following sources:
Expand All @@ -31,6 +48,20 @@ The block automatically detects and handles links from the following sources:

## Examples

#### Standard YouTube video

<Embed slots="video" />

https://www.youtube.com/embed/4haZJxpf9Bo?si=9Pfm0yJD_62ZQnqg

#### Short-form video

<Embed slots="video" short="true"/>

https://www.youtube.com/embed/76hGc6mlSSA

#### YouTube Shorts URL

<Embed slots="video" />

https://youtube.com/shorts/BwjjMllBahU?si=NkufHO7QIoHbFELP
Loading
Loading