Hello there,
I’m trying to add a .Site.BaseURL
in a script but at render time, the base URL always include escaped slashes that are clearly making the script failing.
I’ve tried to convert into a string, using the safeHTML function and few other without success.
Example {{ printf "%s" .Site.BaseURL | safeHTMLAttr }}
<script type="application/ld+json">{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "{{ .Site.BaseURL | absURL }}",
....
As soon as the value is printed outside the script, the correct value is shown.
Any idea of what I’m missing here?