From ec161233068f6f634d81e07de94f64d7fcedc951 Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Tue, 31 May 2022 01:50:30 -0700
Subject: Custom yt and vm shortcodes for youtube and vimeo
---
content/overview-embedded-vimeo.md | 12 ++++++++++--
content/overview-embedded-youtube.md | 11 +++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
(limited to 'content')
diff --git a/content/overview-embedded-vimeo.md b/content/overview-embedded-vimeo.md
index e9dc03d..319c129 100644
--- a/content/overview-embedded-vimeo.md
+++ b/content/overview-embedded-vimeo.md
@@ -12,6 +12,14 @@ Zola has many shortcodes, and new are easily added, this example shows vimeo.
## Vimeo
-with `vm(id="id_here" title="Youtube - Safe Systems Programming in Rust")`
+with `vm(id="id_here")`
-{{ vm(id="514402648" title="Youtube - Safe Systems Programming in Rust") }}
+- `id`: the video id (mandatory)
+- `class`: a class to add to the
surrounding the iframe (optional)
+- `autoplay`: when set to "true", the video autoplays on load (optional)
+- `loop`: when set to "true", the video plays on a loop (optional)
+- `noautopause`: when set to "true", the video will not autopause (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.
+
+{{ vm(id="514402648") }}
diff --git a/content/overview-embedded-youtube.md b/content/overview-embedded-youtube.md
index b9787be..0bcb4f2 100644
--- a/content/overview-embedded-youtube.md
+++ b/content/overview-embedded-youtube.md
@@ -12,6 +12,13 @@ Zola has many shortcodes, and new are easily added, this example shows youtube.
## Youtube
-with `yt(id="the_id_here" title="Vimeo - Gnome vs KDE")`
+with `yt(id="the_id_here")`
-{{ yt(id="32gyFIWecuw" title="Vimeo - Gnome vs KDE") }}
+- `id`: the video id (mandatory)
+- `playlist`: the playlist id (optional)
+- `class`: a class to add to the
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.
+
+{{ yt(id="32gyFIWecuw") }}
--
cgit v1.3.1