mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
@@ -1539,3 +1539,22 @@ List.
|
|||||||
b.AssertLogContains("WARN DEPRECATED: Kind \"taxonomyterm\" used in disableKinds is deprecated, use \"taxonomy\" instead.\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")
|
b.AssertLogContains("WARN DEPRECATED: Kind \"taxonomyterm\" used in outputs configuration is deprecated, use \"taxonomy\" instead.\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDisableKindsIssue12144(t *testing.T) {
|
||||||
|
files := `
|
||||||
|
-- hugo.toml --
|
||||||
|
disableKinds = ["page"]
|
||||||
|
defaultContentLanguage = "pt-br"
|
||||||
|
-- layouts/index.html --
|
||||||
|
Home.
|
||||||
|
-- content/custom/index.pt-br.md --
|
||||||
|
---
|
||||||
|
title: "P1 pt"
|
||||||
|
---
|
||||||
|
-- content/custom/index.en-us.md --
|
||||||
|
---
|
||||||
|
title: "P1 us"
|
||||||
|
---
|
||||||
|
`
|
||||||
|
Test(t, files)
|
||||||
|
}
|
||||||
|
@@ -193,6 +193,10 @@ func (m *pageMap) AddFi(fi hugofs.FileMetaInfo) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if pageResource == nil {
|
||||||
|
// Disabled page.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
key = pi.Base()
|
key = pi.Base()
|
||||||
|
|
||||||
rs = &resourceSource{r: pageResource}
|
rs = &resourceSource{r: pageResource}
|
||||||
|
Reference in New Issue
Block a user