David Hellyer Sign out Sign in

oEmbed

Embed video and audio from any oEmbed provider.

oEmbed

The :::oembed block embeds rich content from any oEmbed-compatible provider. The provider's HTML embed code is fetched at render time and baked into the cached page.

Syntax

::: oembed
https://www.youtube.com/watch?v=VIDEO_ID
:::

Supported providers

Built-in endpoint mappings for fast resolution:

Any other provider that supports oEmbed autodiscovery (a <link> tag with type="application/json+oembed") also works automatically.

Example

---
title: Conference Talks
---
::: oembed
https://www.youtube.com/watch?v=dQw4w9WgXcQ
:::

::: oembed
https://vimeo.com/123456789
:::

Error handling

On success, the embed HTML is wrapped in <div class="oembed">.

On failure (no endpoint found, fetch failed, or missing html field in the JSON response), the URL is rendered as a clickable link inside <div class="oembed oembed--failed">. A warning is written to the error log.

Notes