URI: 
       commands: Support Fast Render mode with sub-path in baseURL - hugo - [fork] hugo port for 9front
  HTML git clone git@git.drkhsh.at/hugo.git
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 3164103310fbca1211cfa9ce4a5eb7437854b6ad
   DIR parent 6a5170116c5c4d90fcb31d43870d44f68860a0d4
  HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
       Date:   Thu, 19 Oct 2017 10:09:04 +0200
       
       commands: Support Fast Render mode with sub-path in baseURL
       
       Fixes #3981
       
       Diffstat:
         M commands/hugo.go                    |       3 ++-
         M commands/server.go                  |       2 +-
       
       2 files changed, 3 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/commands/hugo.go b/commands/hugo.go
       @@ -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...)
        }
   DIR diff --git a/commands/server.go b/commands/server.go
       @@ -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)
                                        }