diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-09-14 11:58:45 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-09-14 19:09:20 +0200 |
commit | 74daca6b3050d96cd3a08b13f45de24edb450163 (patch) | |
tree | d740f7e7174c4685dae8cb262a790300b005be76 /commands/hugo.go | |
parent | 1fd4c562afd467f246c632e9f3fed0a1f350d8dc (diff) |
Support PostProcess for all file types
Not just HTML.
Fixes #10269
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 5169d65a5..d127d3721 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -511,12 +511,15 @@ func (c *commandeer) build() error { c.hugo().PrintProcessingStats(os.Stdout) fmt.Println() - if createCounter, ok := c.publishDirFs.(hugofs.DuplicatesReporter); ok { - dupes := createCounter.ReportDuplicates() - if dupes != "" { - c.logger.Warnln("Duplicate target paths:", dupes) + hugofs.WalkFilesystems(c.publishDirFs, func(fs afero.Fs) bool { + if dfs, ok := fs.(hugofs.DuplicatesReporter); ok { + dupes := dfs.ReportDuplicates() + if dupes != "" { + c.logger.Warnln("Duplicate target paths:", dupes) + } } - } + return false + }) unusedTemplates := c.hugo().Tmpl().(tpl.UnusedTemplatesProvider).UnusedTemplates() for _, unusedTemplate := range unusedTemplates { |