Procházet zdrojové kódy

Add shortcode for img's wrapped in figures

Apis před 1 měsícem
rodič
revize
81917b7dd6
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  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>