diff options
author | Jeremy Bise <jeremy.bise@thosegeeks.com> | 2019-04-17 20:50:35 +0300 |
---|---|---|
committer | Jeremy Bise <jeremy.bise@thosegeeks.com> | 2019-04-17 20:50:35 +0300 |
commit | 3bb68009bcb1e6e9d8d76d3ca2bb08586de9576c (patch) | |
tree | 153a30263fdf8aed608662884369a740c03e7cb7 | |
parent | 30ac8680153584eb203e93382db28dcab1ae6a81 (diff) |
override youtube shortcode
-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 |