From cd36d752a3e8e2b75965fe281e6466d7a274cd94 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Sat, 16 Jan 2016 18:49:18 +0100 Subject: [PATCH] Add autostart option to YouTube shortcode --- docs/content/extras/shortcodes.md | 5 +++++ tpl/template_embedded.go | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/content/extras/shortcodes.md b/docs/content/extras/shortcodes.md index 4d1303ff2..a09923dd9 100644 --- a/docs/content/extras/shortcodes.md +++ b/docs/content/extras/shortcodes.md @@ -182,6 +182,11 @@ Copy the ID from behind `v=` and pass it the shortcode: {{}} +Furthermore, you can autostart the embedded video by setting the `autostart` parameter to true. Remember that you can't mix named an unamed parameters. Assign the yet unamed video id to the parameter `id` like below too. + + {{}} + + ### Vimeo Adding a video from [Vimeo](https://vimeo.com/) is equivalent to the YouTube shortcode above. Extract the ID from the URL, e.g.: diff --git a/tpl/template_embedded.go b/tpl/template_embedded.go index 14364f6db..53f5c0f5e 100644 --- a/tpl/template_embedded.go +++ b/tpl/template_embedded.go @@ -44,7 +44,8 @@ func (t *GoHTMLTemplate) EmbedShortcodes() { t.AddInternalShortcode("speakerdeck.html", "") t.AddInternalShortcode("youtube.html", `{{ if .IsNamedParams }}
- +
{{ else }}