about summary refs log tree commit diff stats
path: root/internal/builder/builder.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/builder/builder.go')
-rw-r--r--internal/builder/builder.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/builder/builder.go b/internal/builder/builder.go
index 7c1911e..6e5cfc9 100644
--- a/internal/builder/builder.go
+++ b/internal/builder/builder.go
@@ -39,7 +39,6 @@ func build(ioConfig *IOConfig, config *config.Config, log *log.Logger) (*Result,
 		CompressFiles: !ioConfig.Development,
 	})
 
-	outDir := ioConfig.Destination
 	joinSource := joinSourcePath(ioConfig.Source)
 
 	log.Debug("output", "dir", ioConfig.Destination)
@@ -168,7 +167,12 @@ func build(ioConfig *IOConfig, config *config.Config, log *log.Logger) (*Result,
 	// date would be wrong as the homepage has its own content file
 	// without a date, which could be newer
 	sitemap.AddPath("/", time.Time{})
-	h, _ = getHTMLStyleHash(outDir, "index.html")
+	f, err := output.Open("index.html")
+	if err != nil {
+		return nil, err
+	}
+	defer f.Close()
+	h, _ = getHTMLStyleHash(f)
 	r.Hashes = append(r.Hashes, h)
 
 	log.Debug("rendering sitemap")