How to properly link stylesheet in head using multilingual setup.
I’m using this code:
{{ $style := resources.Get “style.css” | resources.Minify | resources.Fingerprint “sha512” -}}
But it’s pointing from DomainB to DomainA/style.min… this way it’s broken.
Same code works ok, when using only one domain and languageB is in subfolder.
If i switch from .Permalink to .relURL it’s working in multiple domains but not subfolder setup.
It does not seem to work in the asset pipes. This is not the first time I read here about issues with multi-language sites and stylesheets/javascripts. It seems there is no multi-language support in the asset pipe available.
Just a friendly reminder that I never reply to posts that mention my name for no good reason. Note that I read most threads in here anyway, and not mentioning my nick would then be 100% more effective
.RelPermalink is working even if baseurl is set to subfolder. But its strange to use relative links for css and js and abs urls for the rest of website.
Well the way you link them is relative. It could be whatever/path/you/wish. It’s not inside your content directory, hehe. But by using a path containing the language code you make it individual instead of Hugo trying to save time by using assets only once per run instead of once per path.