浏览代码

Add shortcode for img's wrapped in figures

Apis 1 月之前
父节点
当前提交
81917b7dd6
共有 1 个文件被更改,包括 6 次插入0 次删除
  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>