mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 10:22:10 -05:00
Add shortcode for youtube
This commit is contained in:
parent
cc3f52b9c1
commit
4424288d9b
1 changed files with 1 additions and 0 deletions
|
@ -42,6 +42,7 @@ func (t *GoHTMLTemplate) EmbedShortcodes() {
|
|||
</figure>
|
||||
<!-- image -->`)
|
||||
t.AddInternalShortcode("speakerdeck.html", "<script async class='speakerdeck-embed' data-id='{{ index .Params 0 }}' data-ratio='1.33333333333333' src='https://speakerdeck.com/assets/embed.js'></script>")
|
||||
t.AddInternalShortcode("youtube.html", `<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;"><iframe class="youtube-player" type="text/html" src="https://www.youtube.com/embed/{{ index .Params 0 }}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" allowfullscreen frameborder="0"></iframe></div>`)
|
||||
}
|
||||
|
||||
func (t *GoHTMLTemplate) EmbedTemplates() {
|
||||
|
|
Loading…
Reference in a new issue