Add shortcode for github gists

This commit is contained in:
digitalcraftsman 2015-11-20 18:38:56 +01:00 committed by Bjørn Erik Pedersen
parent 3027b15176
commit e03f27ccf8

View file

@ -46,6 +46,7 @@ func (t *GoHTMLTemplate) EmbedShortcodes() {
t.AddInternalShortcode("vimeo.html", `<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;">
<iframe src="//player.vimeo.com/video/{{ index .Params 0 }}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>`)
t.AddInternalShortcode("gist.html", `<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js"></script>`)
}
func (t *GoHTMLTemplate) EmbedTemplates() {