YouTube
Use the youtube shortcode to embed a responsive video on your site.
Use the youtube
shortcode to embed a responsive video on your site. Only the ID of the video is required. In
privacy-enhanced mode
, YouTube will not store information about visitors on your website unless the user plays the embedded video. As an example, the following shortcode displays a Hugo quickstart guide:
{{< youtube w7Ft2ymGmfc >}}
The shortcode supports the following arguments:
Name | Type | Required | Default | Comment |
---|---|---|---|---|
autoplay | bool | false | Flag indicating the video should start playing immediately when loaded. | |
class | string | Class attribute of the video wrapper element. | ||
id | string | yes | Identifier of the video to be embedded. | |
title | string | Title of the video. |