mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -188,30 +188,43 @@ baseURL = "https://example.com"
|
||||
disableKinds = ["taxonomy", "term"]
|
||||
defaultContentLanguage = "en"
|
||||
defaultContentLanguageInSubdir = true
|
||||
disableLanguages = ["nn"]
|
||||
[languages]
|
||||
[languages.en]
|
||||
weight = 1
|
||||
[languages.nn]
|
||||
weight = 2
|
||||
-- content/p1.md --
|
||||
disabled = true
|
||||
-- content/mysect/_index.md --
|
||||
---
|
||||
title: "My Sect En"
|
||||
---
|
||||
-- content/mysect/p1/index.md --
|
||||
---
|
||||
title: "P1"
|
||||
---
|
||||
P1
|
||||
-- content/p1.nn.md --
|
||||
-- content/mysect/_index.nn.md --
|
||||
---
|
||||
title: "My Sect Nn"
|
||||
---
|
||||
-- content/mysect/p1/index.nn.md --
|
||||
---
|
||||
title: "P1nn"
|
||||
---
|
||||
P1nn
|
||||
-- layouts/index.html --
|
||||
Len RegularPages: {{ len .Site.RegularPages }}|RegularPages: {{ range site.RegularPages }}{{ .RelPermalink }}: {{ .Title }}|{{ end }}|
|
||||
Len Pages: {{ len .Site.Pages }}|
|
||||
Len Sites: {{ len .Site.Sites }}|
|
||||
-- layouts/_default/single.html --
|
||||
{{ .Title }}|{{ .Content }}|{{ .Lang }}|
|
||||
|
||||
`
|
||||
b := Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/en/p1/index.html", "P1|<p>P1</p>\n|en|")
|
||||
b.AssertFileExists("public/public/nn/p1/index.html", false)
|
||||
b.AssertFileContent("public/en/index.html", "Len RegularPages: 1|")
|
||||
b.AssertFileContent("public/en/mysect/p1/index.html", "P1|<p>P1</p>\n|en|")
|
||||
b.AssertFileExists("public/public/nn/mysect/p1/index.html", false)
|
||||
b.Assert(len(b.H.Sites), qt.Equals, 1)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user