aboutsummaryrefslogtreecommitdiff
path: root/content/video-streaming-sites/overview-embed-youtube.md
blob: fb4f29be7ff892ad5cc93c7fada9a28431e7feb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
+++
title = "Embed Youtube"
description = "Sample article showcasing a custom Zola shortcode for embedding Youtube Videos into your pages."
date = 2021-05-08
draft = false

[taxonomies]
tags = ["Features","Shortcodes","Video"]
[extra]
keywords = "Video, Shortcodes, Embed, Embedded, Youtube"
toc = true
series = "Features"
+++

Zola has many shortcodes, and new are easily added, this example shows youtube.
<!-- more -->

## Youtube

### Usage

```rs
{{/* youtube(id="32gyFIWecuw") */}}
```

- `id`: the video id (mandatory)
- `playlist`: the playlist id (optional)
- `class`: a class to add to the &lt;div&gt; surrounding the iframe (optional)
- `autoplay`: when set to "true", the video autoplays on load (optional)
- `title` - set alt title for the iframe (optional, defaults to "Youtube")
- `cookie` - set to "true" if you want tracking cookies, otherwise it defaults to false.

### Output

```html
{{ youtube(id="32gyFIWecuw") }}
```
{{ youtube(id="32gyFIWecuw") }}