blog

My blog at www.shimmy1996.com

git clone git://git.shimmy1996.com/blog.git
commit 5d3ab98e503e262d9b987b7e6fd7387717e889e0
parent 67d76474da435ed6e5079c248918fdc7028723d2
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Wed,  8 Jan 2020 10:02:55 -0600

Override the figure shortcode to remove figure numbering

Diffstat:
Alayouts/shortcodes/figure.html | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
@@ -0,0 +1,5 @@
+{{ if .Get "caption" }}<figure>{{ end }}
+<img alt="{{ (.Get "alt") }}" src="{{ .Get "src" }}"/>
+{{ with .Get "caption" }}
+<figurecaption>{{ . | replaceRE "Figure [0-9]*: " "" | markdownify }}</figurecaption></figure>
+{{ end }}