diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-06-28 12:20:03 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-06-28 12:22:00 +0200 |
commit | 2955f93fc63f658797afa8690f4f39198054db45 (patch) | |
tree | 50207b7ead60fdb3092afcb3b73461720317eff9 /commands/hugo.go | |
parent | 1f0c4e1fb347bb233f3312c424fbf5a013c03604 (diff) | |
download | hugo-2955f93fc63f658797afa8690f4f39198054db45.tar.gz hugo-2955f93fc63f658797afa8690f4f39198054db45.zip |
commands: Fix broken server-reload on config changes
This was accidently broken in Hugo 0.42.
Fixes #4878
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 5c87bd96e..2b847ec95 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -596,14 +596,6 @@ func (c *commandeer) getDirList() ([]string, error) { return a, nil } -func (c *commandeer) recreateAndBuildSites(watching bool) (err error) { - defer c.timeTrack(time.Now(), "Total") - if !c.h.quiet { - c.Logger.FEEDBACK.Println("Started building sites ...") - } - return c.hugo.Build(hugolib.BuildCfg{CreateSitesFromConfig: true}) -} - func (c *commandeer) resetAndBuildSites() (err error) { if !c.h.quiet { c.Logger.FEEDBACK.Println("Started building sites ...") @@ -637,9 +629,10 @@ func (c *commandeer) rebuildSites(events []fsnotify.Event) error { } func (c *commandeer) fullRebuild() { + c.commandeerHugoState = &commandeerHugoState{} if err := c.loadConfig(true, true); err != nil { jww.ERROR.Println("Failed to reload config:", err) - } else if err := c.recreateAndBuildSites(true); err != nil { + } else if err := c.buildSites(); err != nil { jww.ERROR.Println(err) } else if !c.h.buildWatch && !c.Cfg.GetBool("disableLiveReload") { livereload.ForceRefresh() |