Support PostProcess for all file types

Not just HTML.

Fixes #10269
This commit is contained in:
Bjørn Erik Pedersen 2022-09-14 11:58:45 +02:00
parent 1fd4c562af
commit 74daca6b30
9 changed files with 265 additions and 24 deletions

View file

@ -71,8 +71,12 @@ func TestTransform(t *testing.T) {
// Verify that we publish the same file once only.
assertNoDuplicateWrites := func(c *qt.C, spec *Spec) {
c.Helper()
d := spec.Fs.PublishDir.(hugofs.DuplicatesReporter)
c.Assert(d.ReportDuplicates(), qt.Equals, "")
hugofs.WalkFilesystems(spec.Fs.PublishDir, func(fs afero.Fs) bool {
if dfs, ok := fs.(hugofs.DuplicatesReporter); ok {
c.Assert(dfs.ReportDuplicates(), qt.Equals, "")
}
return false
})
}
assertShouldExist := func(c *qt.C, spec *Spec, filename string, should bool) {