diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-08-30 10:25:43 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-08-30 13:44:04 +0300 |
commit | 15d3e48cec8d732b97229cce1d03e88b74092636 (patch) | |
tree | 7ecbec44c8d2222c17fe56ae14c0126e626901f7 /hugolib/pagecollections_test.go | |
parent | b2a02c3c5ab3a5dc8c657d4a30c7b73aa4b93c3b (diff) | |
download | hugo-15d3e48cec8d732b97229cce1d03e88b74092636.tar.gz hugo-15d3e48cec8d732b97229cce1d03e88b74092636.zip |
Fix RegularPagesRecursive for the home page
Fixes #11396
Diffstat (limited to 'hugolib/pagecollections_test.go')
-rw-r--r-- | hugolib/pagecollections_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hugolib/pagecollections_test.go b/hugolib/pagecollections_test.go index 1be296262..b11fc9899 100644 --- a/hugolib/pagecollections_test.go +++ b/hugolib/pagecollections_test.go @@ -432,3 +432,22 @@ Sect1 RegularPagesRecursive: page:/docs/sect1/ps1/|page:/docs/sect1/ps2/|page:/d `) } + +func TestRegularPagesRecursiveHome(t *testing.T) { + files := ` +-- hugo.toml -- +-- content/p1.md -- +-- content/post/p2.md -- +-- layouts/index.html -- +RegularPagesRecursive: {{ range .RegularPagesRecursive }}{{ .Kind }}:{{ .RelPermalink}}|{{ end }}|End. +` + + b := NewIntegrationTestBuilder( + IntegrationTestConfig{ + T: t, + TxtarString: files, + }).Build() + + b.AssertFileContent("public/index.html", `RegularPagesRecursive: page:/p1/|page:/post/p2/||End.`) + +} |