summaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes/img.html
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 16:17:22 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 16:17:22 +0200
commitb3588987080d7998ca18467b9d9fb10be06dfe15 (patch)
tree5dd7c3f6d74851a109772f88e9ae953bcebd8830 /layouts/shortcodes/img.html
parentb4cdaaab0c9f924764d485b1b63c1ca920965b68 (diff)
downloadgohugo-theme-ed-b3588987080d7998ca18467b9d9fb10be06dfe15.tar.gz
Add img shortcode
Diffstat (limited to 'layouts/shortcodes/img.html')
-rw-r--r--layouts/shortcodes/img.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html
new file mode 100644
index 0000000..3d2b03f
--- /dev/null
+++ b/layouts/shortcodes/img.html
@@ -0,0 +1 @@
+<img src="{{ .Get "src" }}" {{- with .Get "alt" }} alt="{{.}}"{{ end }} {{- with .Get "width" }} width="{{.}}"{{ end }} {{- with .Get "height" }} height="{{.}}"{{ end }} {{- with .Get "class" }} class="{{.}}"{{ end }}>