소스 검색

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>