From 688d7e352a3c6370d7aa1871c0bb1d461af6a8e7 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 6 Aug 2023 09:40:35 +0300 Subject: [PATCH] render-heading.html: use variables --- site/layouts/_default/_markup/render-heading.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/layouts/_default/_markup/render-heading.html b/site/layouts/_default/_markup/render-heading.html index cfb3d8fe79..d115f85dcd 100644 --- a/site/layouts/_default/_markup/render-heading.html +++ b/site/layouts/_default/_markup/render-heading.html @@ -1,5 +1,7 @@ -{{ .Text | safeHTML }} +{{- $id := .Anchor | safeURL -}} +{{- $text := .Text | safeHTML -}} +{{ $text }} {{- if and (ge .Level .Page.Site.Params.anchors.min) (le .Level .Page.Site.Params.anchors.max) }}{{" " -}} - + {{- end -}}