Handle disabled RSS even if it's defined in outputs

See https://github.com/gohugoio/hugo/issues/6897#issuecomment-587947078
This commit is contained in:
Bjørn Erik Pedersen
2020-02-19 08:38:46 +01:00
parent c7975b48b6
commit da54787cfa
4 changed files with 31 additions and 8 deletions

View File

@@ -266,3 +266,18 @@ headless: true
b.Assert(resource.RelPermalink(), qt.Equals, "/blog/sect/no-publishresources/data.json")
})
}
// https://github.com/gohugoio/hugo/issues/6897#issuecomment-587947078
func TestDisableRSSWithRSSInCustomOutputs(t *testing.T) {
b := newTestSitesBuilder(t).WithConfigFile("toml", `
disableKinds = ["taxonomy", "taxonomyTerm", "RSS"]
[outputs]
home = [ "HTML", "RSS" ]
`).Build(BuildCfg{})
// The config above is a little conflicting, but it exists in the real world.
// In Hugo 0.65 we consolidated the code paths and made RSS a pure output format,
// but we should make sure to not break existing sites.
b.Assert(b.CheckExists("public/index.xml"), qt.Equals, false)
}