[Solved] .Site.BaseURL Is Escaped?

Hi all.

I’m building a simple site. My config.toml contains a baseURL that looks like the following:

baseURL = "https://developer.okta.com"

Unfortunately, when I try to use that URL in a template via:

  var searchDomain = "{{ .Site.BaseURL }}";

The code ends up being rendered as:

  var searchDomain = "https:\/\/developer.okta.com";

Which doesn’t work for my use case – I need the exact string. I tried using the safeURL function, eg: {{ .Site.BaseURL | safeURL }}, but that doesn’t solve the problem.

What am I missing here?

remove the double-quotes "


Thank you! That solved it… Can’t believe I didn’t try that before.