Hi,
first post 
I have a site with baseURL = "https://example.com/foo" structure. Injecting CSS via
{{- $vendor := resources.Get "scss/vendor.scss" | toCSS }}
{{- $app := resources.Get "scss/app.scss" | toCSS }}
{{- $style := slice $vendor $app | resources.Concat "css/main.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
is working perfectly, CSS is located in /foo/css/.
Now, what I want to achieve is that with using hugo.IsProduction CSS is located in /css/.
According to https://gohugo.io/hugo-pipes/introduction/#asset-publishing " Assets will only be published (to /public ) if .Permalink or . is used."
I tried to use replaceRE on $style. but it replaces ALL occurrences. So after detecting first subfolder I want to replace, It replaces everything.
Any1 got a clue how to achieve that?
Cheers
midzer