mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user