diff --git a/hugolib/site.go b/hugolib/site.go index bde8a2199a5..624630d8019 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -24,12 +24,14 @@ import ( "path" "path/filepath" "regexp" + "runtime" "sort" "strconv" "strings" "time" "github.com/gohugoio/hugo/common/types" + "golang.org/x/text/unicode/norm" "github.com/gohugoio/hugo/common/paths" @@ -950,6 +952,10 @@ func (s *Site) filterFileEvents(events []fsnotify.Event) []fsnotify.Event { continue } + if runtime.GOOS == "darwin" { // When a file system is HFS+, its filepath is in NFD form. + ev.Name = norm.NFC.String(ev.Name) + } + filtered = append(filtered, ev) }