mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
commands: Support Fast Render mode with sub-path in baseURL
Fixes #3981
This commit is contained in:
parent
6a5170116c
commit
3164103310
2 changed files with 3 additions and 2 deletions
|
@ -771,8 +771,9 @@ 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["/"] = true
|
||||
visited[home] = true
|
||||
}
|
||||
return Hugo.Build(hugolib.BuildCfg{PrintStats: !quiet, Watching: true, RecentlyVisited: visited}, events...)
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ func (c *commandeer) serve(port int) {
|
|||
}
|
||||
|
||||
if fastRenderMode {
|
||||
p := r.URL.Path
|
||||
p := r.RequestURI
|
||||
if strings.HasSuffix(p, "/") || strings.HasSuffix(p, "html") || strings.HasSuffix(p, "htm") {
|
||||
c.visitedURLs.Add(p)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue