relURL doesn't output the base path

I finally got the gist of my github page.
There is an issue with just two links (seemingly) out of the whole site. The code to produce them is:

{{with relURL "/fonts/norse.woff2"}}
@font-face {
	font-display: optinal;
	font-family: "norse";
	src: url('{{.}}') format("woff2");
<link rel="preload" href="{{.}}" as="font" type="font/woff2" crossOrigin>

the result is:

<style>@font-face{font-display:optinal;font-family:norse;src:url(/fonts/norse.woff2)format("woff2")}</style><link rel=preload href=/fonts/norse.woff2 as=font type=font/woff2 crossorigin>

my BaseURL is: `BaseURL = “
So why is the base path not in the links’ url ? Is this a bug ? I thought that was the purpose of relURL ?

{{< relurl “quez.html” >}} → /foo/bar/baz/quez.html
{{< relurl “/quez.html” >}} → /foo/bar/baz/quez.html
{{< relurl “…/quez.html” >}} → /foo/bar/quez.html
{{< relurl “./quez.html” >}} → /foo/bar/baz/quez.html

I know there are plenty of issues raised about relURL… None simple to understand

relURL and friends behave differently (intentionally) depending on whether the path begins with a slash.

In most cases you should omit the leading slash.

Can you tell what was the reason behind this highly confusing design ?

It could have gone either way. There are cases when you want the resulting path to be relative to the server root (e.g.,, and (more commonly) relative to the base URL (e.g.,, which may or may not be the server root.

I think it makes more sense to have the leading slash resolve to the server root.

The alternative was to create two more functions (e.g., relUrlServerRoot, relLangURLServerRoot, or something worse).