Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

YouTube (::youtube)

↑ Docs content model

The ::youtube directive embeds a playable YouTube video in the page.

When to use

Use ::youtube to embed a video that complements the written content — a demo or walkthrough. Video should supplement the docs, not replace text a reader needs to follow along or search.

Technical details

Markdown
::youtube[Optional Title]{id='VIDEO_ID'}
  • ::youtube is the directive name.
  • [Optional Title] is an optional, accessible title for the video.
  • {id='VIDEO_ID'} is the required parameter with the YouTube video ID.

The video ID is the part after v= in a YouTube URL. For example, in https://www.youtube.com/watch?v=1cJ0XYaARBY, the ID is 1cJ0XYaARBY.

Rules

  • The id attribute (the YouTube video ID) is required.
  • The title in square brackets is optional but recommended for accessibility.

Style

  • Provide a descriptive title so the embed is accessible and its purpose is clear.

Template

Markdown
::youtube[Optional title]{id='VIDEO_ID'}

Examples

Example:

Markdown
::youtube{id='1cJ0XYaARBY'}

Output:

Used in

Content atoms appear in any page section. Embedded videos most often appear in an Overview or a Tutorial.