Add shortcode for speakerdeck
authordigitalcraftsman <digitalcraftsman@users.noreply.github.com>
Fri, 20 Nov 2015 17:13:43 +0000 (18:13 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 24 Nov 2015 07:59:31 +0000 (08:59 +0100)
tpl/template_embedded.go

index c4e8392f7939afa7dcdf9d45179ad1d9bbd819cd..79999340237805e955a6c92888307ff151ff2893 100644 (file)
@@ -41,6 +41,7 @@ func (t *GoHTMLTemplate) EmbedShortcodes() {
     {{ end }}
 </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>")
 }
 
 func (t *GoHTMLTemplate) EmbedTemplates() {
@@ -215,5 +216,4 @@ ga('create', '{{ . }}', 'auto');
 ga('send', 'pageview');
 </script>
 {{ end }}`)
-
 }