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.
This commit is contained in:
Reorx 2022-06-01 16:21:06 +08:00
parent 82a79a8354
commit 375281fd60
4 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
<p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}> <p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}>
<summary markdown="span">{{ .Get 0 | markdownify }}</summary> <summary markdown="span">{{ .Get 0 | markdownify }}</summary>
{{ .Inner | markdownify }} {{ .Page.RenderString .Inner }}
</details></p> </details></p>

View File

@ -1,5 +1,5 @@
<figure class="center align-center"> <figure class="center align-center">
{{ .Inner | markdownify }} {{ .Page.RenderString .Inner }}
<figcaption><p>{{ .Get 0 | markdownify }}</p></figcaption> <figcaption><p>{{ .Get 0 | markdownify }}</p></figcaption>
</figure> </figure>

View File

@ -2,5 +2,5 @@
{{- with (.Get "width") }}max-width: {{ . }};{{ end -}} {{- with (.Get "width") }}max-width: {{ . }};{{ end -}}
{{- with (.Get "height") }}max-height: {{ . }};{{ end -}} {{- with (.Get "height") }}max-height: {{ . }};{{ end -}}
"> ">
{{ .Inner | markdownify }} {{ .Page.RenderString .Inner }}
</div> </div>

View File

@ -1,3 +1,3 @@
<p class="standout"> <p class="standout">
{{ .Inner | markdownify }} {{ .Page.RenderString .Inner }}
</p> </p>