Deprecate taxonomyTerm

In favour of 'taxonomy'

Closes #11256
This commit is contained in:
Bjørn Erik Pedersen
2023-07-28 12:18:59 +02:00
parent 1c97095ac0
commit bec9b80d95
4 changed files with 66 additions and 7 deletions

View File

@@ -1612,12 +1612,41 @@ List.
}
func TestDisableKindsUnknown(t *testing.T) {
func TestKindsUnknown(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['foo', 'home']
[outputs]
foo = ['HTML', 'AMP', 'RSS']
-- layouts/_default/list.html --
List.
`
b := NewIntegrationTestBuilder(
IntegrationTestConfig{
T: t,
TxtarString: files,
LogLevel: logg.LevelWarn,
},
).Init()
b.AssertLogContains("WARN Unknown kind \"foo\" in disableKinds configuration.\n")
b.AssertLogContains("WARN Unknown kind \"foo\" in outputs configuration.\n")
}
func TestDeprecateTaxonomyTerm(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['taxonomyTerm']
[outputs]
taxonomyterm = ['HTML', 'AMP', 'RSS']
-- layouts/_default/list.html --
List.
@@ -1633,8 +1662,7 @@ List.
},
).Init()
fmt.Println("LOG:", b.LogString())
b.AssertLogContains("WARN Unknown kind \"foo\" in disableKinds\n")
b.AssertLogContains("WARN DEPRECATED: Kind \"taxonomyterm\" used in disableKinds is deprecated, use \"taxonomy\" instead.\n")
b.AssertLogContains("WARN DEPRECATED: Kind \"taxonomyterm\" used in outputs configuration is deprecated, use \"taxonomy\" instead.\n")
}