aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/sitemap_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-21 19:06:46 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-21 20:07:51 +0100
commite75784930dca9e367019ce498fd15076a63edb34 (patch)
tree4ffde280ec5b85e0ffcf23211d3b49b70c7364a1 /hugolib/sitemap_test.go
parentb8ab5c9be6d4bbce609d65ebb51b7acf811e98ff (diff)
downloadhugo-e75784930dca9e367019ce498fd15076a63edb34.tar.gz
hugo-e75784930dca9e367019ce498fd15076a63edb34.zip
Sitemap should not use list.xml
Fixes #12101
Diffstat (limited to 'hugolib/sitemap_test.go')
-rw-r--r--hugolib/sitemap_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go
index 6c2cbc557..1f869c000 100644
--- a/hugolib/sitemap_test.go
+++ b/hugolib/sitemap_test.go
@@ -123,3 +123,28 @@ func TestParseSitemap(t *testing.T) {
t.Errorf("Got \n%v expected \n%v", result, expected)
}
}
+
+func TestSitemapShouldNotUseListXML(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+disableKinds = ["term", "taxonomy"]
+[languages]
+[languages.en]
+weight = 1
+languageName = "English"
+[languages.nn]
+weight = 2
+-- layouts/_default/list.xml --
+Site: {{ .Site.Title }}|
+-- layouts/home --
+Home.
+
+`
+
+ b := Test(t, files)
+
+ b.AssertFileContent("public/sitemap.xml", "https://example.com/en/sitemap.xml")
+}