summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites_build.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-05 10:20:06 +0700
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-17 17:15:26 +0100
commit93ca7c9e958e34469a337e4efcc7c75774ec50fd (patch)
tree5dfa296cfe74fd5ef8f0d41ea4078704f453aa04 /hugolib/hugo_sites_build.go
parente34af6ee30f70f5780a281e2fd8f4ed9b487ee61 (diff)
all: Refactor to nonglobal Viper, i18n etc.
This is a final rewrite that removes all the global state in Hugo, which also enables the use if `t.Parallel` in tests. Updates #2701 Fixes #3016
Diffstat (limited to 'hugolib/hugo_sites_build.go')
-rw-r--r--hugolib/hugo_sites_build.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index e915d11da..a214e523c 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -121,6 +121,7 @@ func (h *HugoSites) process(config *BuildCfg, events ...fsnotify.Event) error {
// but that seems like a daunting task.
// So for now, if there are more than one site (language),
// we pre-process the first one, then configure all the sites based on that.
+
firstSite := h.Sites[0]
if len(events) > 0 {
@@ -169,9 +170,6 @@ func (h *HugoSites) assemble(config *BuildCfg) error {
}
for _, s := range h.Sites {
- if err := s.setCurrentLanguageConfig(); err != nil {
- return err
- }
s.preparePagesForRender(config)
}