From 6ac16b42d330c7bbb6a51ec14be791f880c12144 Mon Sep 17 00:00:00 2001 From: Sylvia Dieckmann Date: Wed, 15 Jun 2022 09:44:46 +0200 Subject: [PATCH] Add safeHTML to blog-title SafeHTML signals to the go templating engine that the html in this string is considered safe and does not need to be escaped. This will allow me to add some additional markup to the title. In my case, I use an explicit
tag to control the line break. --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index d66bf9e..6f3e915 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -6,7 +6,7 @@
- {{ with .Params.header_headline }}

{{ . }}

{{ end }} + {{ with .Params.header_headline }}

{{ . | safeHTML }}

{{ end }} {{ with .Params.header_subheadline }}

{{ . }}

{{ end }} {{ range where $sections ".Params.header_menu" "eq" true }}