From 50262b08f7c69ec495c8b540b6f37aab96b832a8 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:49:00 +0100 Subject: [PATCH] hugo: don't escape HTML in redirects.json Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/index.redirects.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/index.redirects.json b/layouts/index.redirects.json index 8136b17c13..5add507401 100644 --- a/layouts/index.redirects.json +++ b/layouts/index.redirects.json @@ -1,4 +1,4 @@ -{{ $redirects := newScratch }} +{{- $redirects := newScratch }} {{- range $i, $e := site.AllPages -}} {{- if .Params.aliases -}} {{- $target := .RelPermalink -}} @@ -12,4 +12,5 @@ {{- $redirects.SetInMap "paths" . $target -}} {{- end -}} {{- end -}} -{{ $redirects.Get "paths" | jsonify }} +{{- $opts := dict "noHTMLEscape" true }} +{{- $redirects.Get "paths" | jsonify $opts }}