diff options
author | huabing zhao <zhaohuabing@gmail.com> | 2020-08-17 16:27:31 +0300 |
---|---|---|
committer | huabing zhao <zhaohuabing@gmail.com> | 2020-08-17 16:27:31 +0300 |
commit | e37fc5d1eb4ffb184e243f3cafd7d39ad17bb902 (patch) | |
tree | 20849f5574e23c5feaa7ffd650e05b059144f5d5 | |
parent | c7fa60e7c37ee2003639ec6a4f4924a84d1de50b (diff) |
Add title to image
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
-rw-r--r-- | layouts/_default/_markup/render-image.html | 8 |
1 files changed, 8 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..13b94cb --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1,8 @@ +{{ if .Title }} + <figure> + <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}"> + <center><figcaption>{{ .Title }}</figcaption></center> + </figure> +{{ else }} + <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}"> +{{ end }} |