summaryrefslogtreecommitdiff
path: root/layouts/_default/_markup/render-image.html
diff options
context:
space:
mode:
authorcolorchestra <morph@posteo.de>2020-11-18 18:21:45 +0100
committerGitHub <noreply@github.com>2020-11-18 18:21:45 +0100
commitb4a26052227c37a768846af47dfedeeab187b3f7 (patch)
tree594a88ddf30f9fb35acfe03b7cce8b7f7b7ae0f0 /layouts/_default/_markup/render-image.html
parent3fcb92e2c26e0b9e110ab0c8d1a6afb921c6ac1f (diff)
parentf2dbf084a70b47113f6741455b34e3d65fcdabb1 (diff)
Merge pull request #8 from pfandzelter/add-image-captions
Add Captions to Images
Diffstat (limited to 'layouts/_default/_markup/render-image.html')
-rw-r--r--layouts/_default/_markup/render-image.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
new file mode 100644
index 0000000..41008ca
--- /dev/null
+++ b/layouts/_default/_markup/render-image.html
@@ -0,0 +1,11 @@
+{{ if .Title }}
+<figure>
+ <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
+ <figcaption>{{ .Title }}</figcaption>
+</figure>
+{{ else }}
+<figure>
+ <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
+</figure>
+{{ end }}
+