Add hugo.WorkingDir

Fixes #10969
This commit is contained in:
Bjørn Erik Pedersen
2023-05-20 15:04:22 +02:00
parent 4f085e80da
commit 7c7baa6183
11 changed files with 86 additions and 14 deletions

View File

@@ -898,6 +898,29 @@ mainSections: []
}
func TestConfigHugoWorkingDir(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
-- layouts/index.html --
WorkingDir: {{ hugo.WorkingDir }}|
`
b := NewIntegrationTestBuilder(
IntegrationTestConfig{
T: t,
TxtarString: files,
WorkingDir: "myworkingdir",
},
).Build()
b.AssertFileContent("public/index.html", `
WorkingDir: myworkingdir|
`)
}
func TestConfigMergeLanguageDeepEmptyLefSide(t *testing.T) {
t.Parallel()