diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-12-29 09:37:37 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-12-29 09:37:37 +0100 |
commit | 72903be587e9c4e3644f60b11e26238ec03da2db (patch) | |
tree | c59cc06465771502f2f7669a3e593f567af18b2c /commands/hugo.go | |
parent | 1c114d539b0755724443fe28c90b12fe2a19085a (diff) |
commands: Make sure all language homes are always re-rendered in fast render mode
Fixes #4125
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 200a5e1c3..743c5a267 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -940,9 +940,17 @@ func (c *commandeer) rebuildSites(events []fsnotify.Event) error { visited := c.visitedURLs.PeekAllSet() doLiveReload := !buildWatch && !c.Cfg.GetBool("disableLiveReload") if doLiveReload && !c.Cfg.GetBool("disableFastRender") { - home := c.pathSpec.PrependBasePath("/") - // Make sure we always render the home page - visited[home] = true + + // Make sure we always render the home pages + for _, l := range c.languages { + langPath := c.PathSpec().GetLangSubDir(l.Lang) + if langPath != "" { + langPath = langPath + "/" + } + home := c.pathSpec.PrependBasePath("/" + langPath) + visited[home] = true + } + } return Hugo.Build(hugolib.BuildCfg{RecentlyVisited: visited}, events...) } |