summaryrefslogtreecommitdiff
path: root/layouts/shortcodes/image-size-control.html
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-06-01 16:21:06 +0800
committerReorx <novoreorx@gmail.com>2022-06-01 16:21:06 +0800
commit375281fd60b39685052c9f8cd6357392724113e1 (patch)
tree2aa2a6385ce496858ad5528f39e60518c8e56d09 /layouts/shortcodes/image-size-control.html
parent82a79a8354a2b9a84dc14e9f50963e313e488cd8 (diff)
fix shortcodes rendering markdown img
replace markdownify with .Page.RenderString, the latter trigger render hook properly see: https://gohugo.io/functions/markdownify/#readout > Note: if you need Render Hooks, which markdownify doesn’t currently support, use .RenderString instead.
Diffstat (limited to 'layouts/shortcodes/image-size-control.html')
-rw-r--r--layouts/shortcodes/image-size-control.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/shortcodes/image-size-control.html b/layouts/shortcodes/image-size-control.html
index 170322f..1bf374d 100644
--- a/layouts/shortcodes/image-size-control.html
+++ b/layouts/shortcodes/image-size-control.html
@@ -2,5 +2,5 @@
{{- with (.Get "width") }}max-width: {{ . }};{{ end -}}
{{- with (.Get "height") }}max-height: {{ . }};{{ end -}}
">
- {{ .Inner | markdownify }}
+ {{ .Page.RenderString .Inner }}
</div>