diff options
Diffstat (limited to 'hugolib/hugo_sites_build.go')
-rw-r--r-- | hugolib/hugo_sites_build.go | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index 1a191257c..3bebc5284 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -18,7 +18,6 @@ import ( "context" "encoding/json" "fmt" - "os" "path/filepath" "runtime/trace" "strings" @@ -439,23 +438,15 @@ func (h *HugoSites) postProcess() error { return nil } - _ = afero.Walk(h.BaseFs.PublishFs, "", func(path string, info os.FileInfo, err error) error { - if info == nil || info.IsDir() { - return nil - } - - if !strings.HasSuffix(path, "html") { - return nil - } - + for _, filename := range h.Deps.FilenameHasPostProcessPrefix { + filename := filename g.Run(func() error { - return handleFile(path) + return handleFile(filename) }) - - return nil - }) + } // Prepare for a new build. + h.Deps.FilenameHasPostProcessPrefix = nil for _, s := range h.Sites { s.ResourceSpec.PostProcessResources = make(map[string]postpub.PostPublishedResource) } |