diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-03-01 11:37:53 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-03-01 13:34:05 +0100 |
commit | 9dfa9e70e6ac56cfbb875caf5fed412eb2b22d82 (patch) | |
tree | 30167f680a7edc7d2b0e8526cbc67755dff8e768 /hugolib/sitemap_test.go | |
parent | 3f217fd6647b859b828b2ab1798177bebda64a9a (diff) | |
download | hugo-9dfa9e70e6ac56cfbb875caf5fed412eb2b22d82.tar.gz hugo-9dfa9e70e6ac56cfbb875caf5fed412eb2b22d82.zip |
Make sure that sitemaps gets generated even if there is a content bundle with the same path
Fixes #12183
Diffstat (limited to 'hugolib/sitemap_test.go')
-rw-r--r-- | hugolib/sitemap_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go index 1f869c000..6dad39fe3 100644 --- a/hugolib/sitemap_test.go +++ b/hugolib/sitemap_test.go @@ -148,3 +148,25 @@ Home. b.AssertFileContent("public/sitemap.xml", "https://example.com/en/sitemap.xml") } + +func TestSitemapAndContentBundleNamedSitemap(t *testing.T) { + t.Parallel() + + files := ` +-- hugo.toml -- +disableKinds = ['home','rss','section','taxonomy','term'] +-- layouts/_default/single.html -- +layouts/_default/single.html +-- layouts/sitemap/single.html -- +layouts/sitemap/single.html +-- content/sitemap/index.md -- +--- +title: My sitemap +type: sitemap +--- +` + + b := Test(t, files) + + b.AssertFileExists("public/sitemap.xml", true) +} |