Fix --renderStaticToDisk regression

Fixes #11026
This commit is contained in:
Bjørn Erik Pedersen 2023-05-27 15:22:45 +02:00
parent 901cd970db
commit 8f293a1855
2 changed files with 2 additions and 1 deletions

View file

@ -288,7 +288,7 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, net.Listener, string
}
var fs afero.Fs
f.c.withConf(func(conf *commonConfig) {
fs = conf.fs.PublishDir
fs = conf.fs.PublishDirServer
})
fi, err := fs.Stat(path)

View file

@ -6,6 +6,7 @@ hugo server --renderStaticToDisk &
waitServer
httpget $HUGOTEST_BASEURL_0 'Title: Hugo Server Test' $HUGOTEST_BASEURL_0
httpget ${HUGOTEST_BASEURL_0}mystatic.txt 'This is a static file.'
! exists public/index.html
exists public/mystatic.txt