diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-28 09:30:58 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-09-06 18:32:16 +0300 |
commit | 708bc78770a0b0361908f6404f57264c53252a95 (patch) | |
tree | 9b7e3a05b1e83a768bfa0dd96b61b07dd7917cfd /commands/hugo.go | |
parent | f023dfd7636f73b11c94e86a05c6273941d52c58 (diff) |
Optimize the multilanguage build process
Work In Progress!
This commit makes a rework of the build and rebuild process to better suit a multi-site setup.
This also includes a complete overhaul of the site tests. Previous these were a messy mix that
were testing just small parts of the build chain, some of it testing code-paths not even used in
"real life". Now all tests that depends on a built site follows the same and real production code path.
See #2309
Closes #2211
Closes #477
Closes #1744
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 959006557..9ad46b3bf 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -49,7 +49,7 @@ import ( // Hugo represents the Hugo sites to build. This variable is exported as it // is used by at least one external library (the Hugo caddy plugin). We should // provide a cleaner external API, but until then, this is it. -var Hugo hugolib.HugoSites +var Hugo *hugolib.HugoSites // Reset resets Hugo ready for a new full build. This is mainly only useful // for benchmark testing etc. via the CLI commands. @@ -715,11 +715,11 @@ func getDirList() []string { func buildSites(watching ...bool) (err error) { fmt.Println("Started building sites ...") w := len(watching) > 0 && watching[0] - return Hugo.Build(w, true) + return Hugo.Build(hugolib.BuildCfg{Watching: w, PrintStats: true}) } func rebuildSites(events []fsnotify.Event) error { - return Hugo.Rebuild(events, true) + return Hugo.Rebuild(hugolib.BuildCfg{PrintStats: true}, events...) } // NewWatcher creates a new watcher to watch filesystem events. |