Selaa lähdekoodia

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 vuosi sitten
vanhempi
säilyke
f652f74307
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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>