diff options
-rw-r--r-- | layouts/shortcodes/.keep | 0 | ||||
-rw-r--r-- | layouts/shortcodes/youtube.html | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/layouts/shortcodes/.keep b/layouts/shortcodes/.keep deleted file mode 100644 index e69de29..0000000 --- a/layouts/shortcodes/.keep +++ /dev/null diff --git a/layouts/shortcodes/youtube.html b/layouts/shortcodes/youtube.html new file mode 100644 index 0000000..23fbe17 --- /dev/null +++ b/layouts/shortcodes/youtube.html @@ -0,0 +1,9 @@ +{{ if .IsNamedParams }} + <p> + <iframe src="//www.youtube.com/embed/{{ .Get "id" }}?{{ with .Get "autoplay" }}{{ if eq . "true" }}autoplay=1{{ end }}{{ end }}" allowfullscreen frameborder="0"></iframe> + </p> +{{ else }} + <p> + <iframe width="640" height="360" src="//www.youtube.com/embed/{{ .Get 0 }}" allowfullscreen frameborder="0"></iframe> + </p> +{{ end }}
\ No newline at end of file |