Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'target/file.go')
-rw-r--r--target/file.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/file.go b/target/file.go
index 29c019f4e..f5ae62db3 100644
--- a/target/file.go
+++ b/target/file.go
@@ -56,6 +56,9 @@ func (fs *Filesystem) Publish(path string, r io.Reader) (err error) {
func (fs *Filesystem) Translate(src string) (dest string, err error) {
if src == "/" {
+ if fs.PublishDir != "" {
+ return path.Join(fs.PublishDir, "index.html"), nil
+ }
return "index.html", nil
}