mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-04 22:01:18 +00:00
hugolib: Add missing page kind to allKinds
This commit is contained in:
parent
b2e3748a4e
commit
9416fdd334
2 changed files with 7 additions and 2 deletions
|
@ -39,6 +39,12 @@ func TestDisableKindsSomeDisabled(t *testing.T) {
|
||||||
func TestDisableKindsOneDisabled(t *testing.T) {
|
func TestDisableKindsOneDisabled(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
for _, kind := range allKinds {
|
for _, kind := range allKinds {
|
||||||
|
if kind == KindPage {
|
||||||
|
// Turning off regular page generation have some side-effects
|
||||||
|
// not handled by the assertions below (no sections), so
|
||||||
|
// skip that for now.
|
||||||
|
continue
|
||||||
|
}
|
||||||
doTestDisableKinds(t, kind)
|
doTestDisableKinds(t, kind)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +55,6 @@ func TestDisableKindsAllDisabled(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func doTestDisableKinds(t *testing.T, disabled ...string) {
|
func doTestDisableKinds(t *testing.T, disabled ...string) {
|
||||||
|
|
||||||
siteConfigTemplate := `
|
siteConfigTemplate := `
|
||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
|
|
|
@ -43,7 +43,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
cjk = regexp.MustCompile(`\p{Han}|\p{Hangul}|\p{Hiragana}|\p{Katakana}`)
|
cjk = regexp.MustCompile(`\p{Han}|\p{Hangul}|\p{Hiragana}|\p{Katakana}`)
|
||||||
allKinds = []string{KindHome, KindSection, KindTaxonomy, KindTaxonomyTerm, kindRSS, kindSitemap, kindRobotsTXT, kind404}
|
allKinds = []string{KindPage, KindHome, KindSection, KindTaxonomy, KindTaxonomyTerm, kindRSS, kindSitemap, kindRobotsTXT, kind404}
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in a new issue