Hello,
what is the best way to make assets permalink be generated correctly for multilangual multihost site?
I want to build a website which has multiple host names for each translation
Config file:
[languages]
[languages.en]
baseURL = "https://www.example.com"
weight = 1
[languages.cs]
baseURL = "https://www.example.cz"
weight = 2
And asset referenced in a template:
{{ $indexJS := resources.Get "js/index.js" | resources.Fingerprint "sha256" }}
<script type="text/javascript" src="{{ $indexJS.Permalink }}" integrity="{{ $indexJS.Data.Integrity }}"></script>
But this setting is always (for both translations) building a permalink with baseURL of the language with lowest weight. For local server there is localhost and port of the language too:
<script type="text/javascript" src="http://localhost:1313/js/index.532cd6d4dd8914b1545e914c99d3816fc806a7a24058f8c01f8576544aec2bc9.js" integrity="sha256-UyzW1N2JFLFUXpFMmdOBb8gGp6JAWPjAH4V2VErsK8k="></script>
while localhost:1314 is expected for the cs version of the site.
I can make it work correctly by using .RelPermalink and absLangUrl
{{ $indexJS := resources.Get "js/index.js" | resources.Fingerprint "sha256" }}
<script type="text/javascript" src="{{ $indexJS.RelPermalink | absLangURL }}" integrity="{{ $indexJS.Data.Integrity }}"></script>
But I would expect the .Permalink to work directly. Is this an expected behavior? If so, can I somewhere read more about the reasons for the actual implementation?
Thank you!