Replace last usages of markdownify with .RenderString.

This commit is contained in:
Fredrik Jonsson 2025-02-12 09:09:50 +01:00
commit 001f71cacd
6 changed files with 8 additions and 8 deletions

View file

@ -756,7 +756,7 @@ Add a search form for the site, [see more above](#search).
### Wrapper
A simple, but useful, shortcode to wrap content in a div with a class. The content will be run through "markdownify".
A simple, but useful, shortcode to wrap content in a div with a class. The content can use markdown.
```
{{< wrapper class-name-you-want >}}

View file

@ -46,8 +46,8 @@
{{ partial "footer.html" . }}
{{ else -}}
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
<p>{{ with site.Copyright }}{{ . | markdownify }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }}
<p>{{ with site.Copyright }}{{ . | site.Home.RenderString }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
{{ with $.Param "footer" }}<p>{{ . | site.Home.RenderString }}</p>{{ end }}
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
{{ end -}}
</footer>

View file

@ -36,6 +36,6 @@
<source src="{{ $src }}" {{ with $type }}type="{{ . }}"{{ end }}>
</audio>
{{ with $caption -}}
<figcaption>{{ . | markdownify }}</figcaption>
<figcaption>{{ . | .Page.RenderString }}</figcaption>
{{ end -}}
</figure>

View file

@ -100,8 +100,8 @@
{{ if or $title $caption $attr -}}
<figcaption>
{{ with $title }}<strong>{{ . }}</strong><br>{{ end -}}
{{- $caption | markdownify }}{{ if and $caption $attr }} {{ end -}}
{{ with $attrlink }}<a href="{{ . }}">{{ end }}{{ $attr | markdownify }}{{ if $attrlink }}</a>{{ end -}}
{{- $caption | .Page.RenderString }}{{ if and $caption $attr }} {{ end -}}
{{ with $attrlink }}<a href="{{ . }}">{{ end }}{{ $attr | .Page.RenderString }}{{ if $attrlink }}</a>{{ end -}}
</figcaption>
{{ end -}}
</figure>

View file

@ -59,7 +59,7 @@
{{- if $link }}</a>{{ end }}
{{ if $caption -}}
<figcaption>
{{ $caption | markdownify -}}
{{ $caption | .Page.RenderString -}}
</figcaption>
</figure>
{{ end -}}

View file

@ -62,6 +62,6 @@
<source src="{{ $src }}" {{ with $type }}type="{{ . }}"{{ end }}>
</video>
{{ with $caption -}}
<figcaption>{{ . | markdownify }}</figcaption>
<figcaption>{{ . | .Page.RenderString }}</figcaption>
{{ end -}}
</figure>