diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2023-10-08 21:58:54 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-12-04 11:42:06 +0100 |
commit | 171836cdfae7e9697fddafe262c46b9448bcb98e (patch) | |
tree | aa3e0d7565d6b582a50c46f69ebc57f94e1c5563 /hugolib/integration_test.go | |
parent | 9ea7103db7fb323f1140bb354c2a66d3f8ac5932 (diff) |
hugolib: Apply titleCaseStyle to automatic section pages
Fixes #11547
Diffstat (limited to 'hugolib/integration_test.go')
-rw-r--r-- | hugolib/integration_test.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/hugolib/integration_test.go b/hugolib/integration_test.go index 1109694b1..93468eceb 100644 --- a/hugolib/integration_test.go +++ b/hugolib/integration_test.go @@ -114,3 +114,36 @@ func TestRenderStringBadMarkupOpt(t *testing.T) { } } + +// Issue #11547 +func TestTitleCaseStyleWithAutomaticSectionPages(t *testing.T) { + t.Parallel() + + files := ` +-- config.toml -- +titleCaseStyle = 'none' +-- content/books/book-1.md -- +--- +title: Book 1 +tags: [fiction] +--- +-- content/films/_index.md -- +--- +title: Films +--- +-- layouts/index.html -- +{{ (site.GetPage "/tags").Title }} +{{ (site.GetPage "/tags/fiction").Title }} +{{ (site.GetPage "/books").Title }} +{{ (site.GetPage "/films").Title }} + ` + + b := hugolib.NewIntegrationTestBuilder( + hugolib.IntegrationTestConfig{ + T: t, + TxtarString: files, + }, + ) + b.Build() + b.AssertFileContent("public/index.html", "tags\nfiction\nbooks\nFilms") +} |