diff options
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/paths/paths.go | 2 | ||||
-rw-r--r-- | hugolib/site.go | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/hugolib/paths/paths.go b/hugolib/paths/paths.go index 397dba3f8..60ec873f9 100644 --- a/hugolib/paths/paths.go +++ b/hugolib/paths/paths.go @@ -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)) } } diff --git a/hugolib/site.go b/hugolib/site.go index f73bd2517..4e2497ee1 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -42,6 +42,7 @@ import ( "github.com/gohugoio/hugo/deps" "github.com/gohugoio/hugo/hugolib/doctree" "github.com/gohugoio/hugo/hugolib/pagesfromdata" + "github.com/gohugoio/hugo/internal/js/esbuild" "github.com/gohugoio/hugo/internal/warpc" "github.com/gohugoio/hugo/langs/i18n" "github.com/gohugoio/hugo/modules" @@ -205,6 +206,12 @@ func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) { return nil, err } + batcherClient, err := esbuild.NewBatcherClient(firstSiteDeps) + if err != nil { + return nil, err + } + firstSiteDeps.JSBatcherClient = batcherClient + confm := cfg.Configs if err := confm.Validate(logger); err != nil { return nil, err @@ -313,7 +320,6 @@ func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) { return li.Lang < lj.Lang }) - var err error h, err = newHugoSites(cfg, firstSiteDeps, pageTrees, sites) if err == nil && h == nil { panic("hugo: newHugoSitesNew returned nil error and nil HugoSites") |