aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generators/hugo/themes/tdro/layouts/shortcodes/gist.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/gist.html b/generators/hugo/themes/tdro/layouts/shortcodes/gist.html
new file mode 100644
index 0000000..3d61a82
--- /dev/null
+++ b/generators/hugo/themes/tdro/layouts/shortcodes/gist.html
@@ -0,0 +1,10 @@
+{{- $user := default "gdb" (.Get "user" | default (.Get 0)) -}}
+{{- $gist := default "b6365e79be6052e7531e7ba6ea8caf23" (.Get "gist" | default (.Get 1)) -}}
+{{- $file := default "" (.Get "file" | default (.Get 2)) -}}
+
+<github-gist>
+ <script
+ type="application/javascript"
+ src="https://gist.github.com/{{ $user }}/{{ $gist }}.js?file={{ $file }}">
+ </script>
+</github-gist>