Understanding resource links

This snippet:

foo="{{ (resources.Get "css/site.css").RelPermalink }}";
href="{{ (resources.Get "css/site.css").RelPermalink }}";



Why are the links different?

Unable to reproduce. Placed snippet in layouts/_default/single.html.

I get it when I have relativeURLs: "true" in my config.

That setting makes Hugo look for URL attributes (e.g. href) in the HTML output; foo is not.

I suspected something like that…

<link rel="stylesheet" href="{{ (resources.Get "css/site.css").RelPermalink }}" />
foo::before {
content:  "{{ (resources.Get "css/site.css").RelPermalink }}";
<meta property="og:image" content="{{ (resources.Get "css/site.css").RelPermalink }}"/>

yields three different variants:

<link rel="stylesheet" href="./css/site.css" />
foo::before {
content:  "\2f css\2fsite.css";
<meta property="og:image" content="/css/site.css"/>

woahhhh … is this a feature ? Can explain some troubles I had.