Преглед на файлове

Add render hook for images

When rendering images from markdown, the image is now placed inside of a
figure element. The text associated with the image gets placed into a
figcaption element.
ApisNecros преди 1 година
родител
ревизия
f652f74307
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      layouts/_default/_markup/render-image.html

+ 4 - 0
layouts/_default/_markup/render-image.html

@@ -0,0 +1,4 @@
+<figure>
+    <img src="{{ .Destination }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}" {{ end }}/>
+    <figcaption>{{.Text | safeHTML }}</figcaption>
+</figure>