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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user