diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-01-30 11:43:20 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-01-30 20:12:19 +0100 |
commit | 5b7cb258ec26d7de690099f5dc39935b8d728155 (patch) | |
tree | 53544c8ab46e3fffda4a1e33c5d6e705183e2652 /hugolib/pagecollections_test.go | |
parent | 80595bbe3e7901ecd6200e59d43af142c3c85b6b (diff) | |
download | hugo-5b7cb258ec26d7de690099f5dc39935b8d728155.tar.gz hugo-5b7cb258ec26d7de690099f5dc39935b8d728155.zip |
Create default link and image render hooks
Fixes #11933
Diffstat (limited to 'hugolib/pagecollections_test.go')
-rw-r--r-- | hugolib/pagecollections_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hugolib/pagecollections_test.go b/hugolib/pagecollections_test.go index 8fd4f0739..eaa80a109 100644 --- a/hugolib/pagecollections_test.go +++ b/hugolib/pagecollections_test.go @@ -413,6 +413,10 @@ title: p2 func TestPageGetPageVariations(t *testing.T) { files := ` -- hugo.toml -- +-- content/s1/_index.md -- +--- +title: s1 section +--- -- content/s1/p1/index.md -- --- title: p1 @@ -430,6 +434,8 @@ title: p3 title: p2_root --- -- layouts/index.html -- +/s1: {{ with .GetPage "/s1" }}{{ .Title }}{{ end }}| +/s1/: {{ with .GetPage "/s1/" }}{{ .Title }}{{ end }}| /s1/p2.md: {{ with .GetPage "/s1/p2.md" }}{{ .Title }}{{ end }}| /s1/p2: {{ with .GetPage "/s1/p2" }}{{ .Title }}{{ end }}| /s1/p1/index.md: {{ with .GetPage "/s1/p1/index.md" }}{{ .Title }}{{ end }}| @@ -444,6 +450,8 @@ p1/index.md: {{ with .GetPage "p1/index.md" }}{{ .Title }}{{ end }}| b := Test(t, files) b.AssertFileContent("public/index.html", ` +/s1: s1 section| +/s1/: s1 section| /s1/p2.md: p2| /s1/p2: p2| /s1/p1/index.md: p1| |