1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Handle 404 thread safely

Replaces hack that temporarily changes a global flag.

Fixes #955
Fixes #939
This commit is contained in:
bep
2015-03-07 15:18:00 +01:00
parent 851badcb7e
commit 602ceec06d
3 changed files with 87 additions and 25 deletions

View File

@@ -46,7 +46,7 @@ func (pp *PagePub) Translate(src string) (dest string, err error) {
dir = filepath.Join(pp.PublishDir, dir)
}
if pp.UglyUrls || file == "index.html" {
if pp.UglyUrls || file == "index.html" || file == "404.html" {
return filepath.Join(dir, fmt.Sprintf("%s%s", name, ext)), nil
}