Explorar o código

Add shortcode for img's wrapped in figures

Apis hai 1 mes
pai
achega
81917b7dd6
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      layouts/shortcodes/imgFigure.html

+ 6 - 0
layouts/shortcodes/imgFigure.html

@@ -0,0 +1,6 @@
+<figure>
+    <img src="{{ .Get "src"}}" alt="{{ .Get "alt" }}" />
+    {{ with .Get "caption"}}
+    <figcaption>{{ . }}</figcaption>
+    {{- end -}}
+</figure>