js: Fix js.Batch for multihost setups

Note that this is an unreleased feature.

Fixes #13151
This commit is contained in:
Bjørn Erik Pedersen
2024-12-16 08:34:17 +01:00
parent 48dd6a918a
commit 565c30eac9
8 changed files with 190 additions and 71 deletions

View File

@@ -67,7 +67,7 @@ func New(fs *hugofs.Fs, cfg config.AllProvider) (*Paths, error) {
var multihostTargetBasePaths []string
if cfg.IsMultihost() && len(cfg.Languages()) > 1 {
for _, l := range cfg.Languages() {
multihostTargetBasePaths = append(multihostTargetBasePaths, l.Lang)
multihostTargetBasePaths = append(multihostTargetBasePaths, hpaths.ToSlashPreserveLeading(l.Lang))
}
}