From 001f71cacd24c9baf2f83586b04756ea6b30b06f Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Wed, 12 Feb 2025 09:09:50 +0100 Subject: [PATCH] Replace last usages of markdownify with .RenderString. --- README.md | 2 +- layouts/_default/baseof.html | 4 ++-- layouts/shortcodes/audio.html | 2 +- layouts/shortcodes/figure.html | 4 ++-- layouts/shortcodes/svg.html | 2 +- layouts/shortcodes/video.html | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 259cf5e..fdbab56 100644 --- a/README.md +++ b/README.md @@ -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 >}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 2767a28..7294327 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -46,8 +46,8 @@ {{ partial "footer.html" . }} {{ else -}} {{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}} -

{{ with site.Copyright }}{{ . | markdownify }}{{ else }}© {{ site.Title }}{{ end }}

-{{ with $.Param "footer" }}

{{ . | markdownify }}

{{ end }} +

{{ with site.Copyright }}{{ . | site.Home.RenderString }}{{ else }}© {{ site.Title }}{{ end }}

+{{ with $.Param "footer" }}

{{ . | site.Home.RenderString }}

{{ end }} {{ if $.Param "poweredby" }}

Powered by Hugo and the Zen theme.

{{ end }} {{ end -}} diff --git a/layouts/shortcodes/audio.html b/layouts/shortcodes/audio.html index c4592dc..a69fbe5 100644 --- a/layouts/shortcodes/audio.html +++ b/layouts/shortcodes/audio.html @@ -36,6 +36,6 @@ {{ with $caption -}} -
{{ . | markdownify }}
+
{{ . | .Page.RenderString }}
{{ end -}} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 32e3648..16cfe27 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -100,8 +100,8 @@ {{ if or $title $caption $attr -}}
{{ with $title }}{{ . }}
{{ end -}} -{{- $caption | markdownify }}{{ if and $caption $attr }} {{ end -}} -{{ with $attrlink }}{{ end }}{{ $attr | markdownify }}{{ if $attrlink }}{{ end -}} +{{- $caption | .Page.RenderString }}{{ if and $caption $attr }} {{ end -}} +{{ with $attrlink }}{{ end }}{{ $attr | .Page.RenderString }}{{ if $attrlink }}{{ end -}}
{{ end -}} diff --git a/layouts/shortcodes/svg.html b/layouts/shortcodes/svg.html index c7bb54f..2fc4861 100644 --- a/layouts/shortcodes/svg.html +++ b/layouts/shortcodes/svg.html @@ -59,7 +59,7 @@ {{- if $link }}{{ end }} {{ if $caption -}}
-{{ $caption | markdownify -}} +{{ $caption | .Page.RenderString -}}
{{ end -}} diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html index 558c110..30f78f2 100644 --- a/layouts/shortcodes/video.html +++ b/layouts/shortcodes/video.html @@ -62,6 +62,6 @@ {{ with $caption -}} -
{{ . | markdownify }}
+
{{ . | .Page.RenderString }}
{{ end -}}