summaryrefslogtreecommitdiffstats
path: root/hugolib/sitemap_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/sitemap_test.go')
-rw-r--r--hugolib/sitemap_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go
index cab13d356..5aba6f09d 100644
--- a/hugolib/sitemap_test.go
+++ b/hugolib/sitemap_test.go
@@ -100,3 +100,22 @@ func TestParseSitemap(t *testing.T) {
}
}
+
+// https://github.com/gohugoio/hugo/issues/5910
+func TestSitemapOutputFormats(t *testing.T) {
+
+ b := newTestSitesBuilder(t).WithSimpleConfigFile()
+
+ b.WithContent("blog/html-amp.md", `
+---
+Title: AMP and HTML
+outputs: [ "html", "amp" ]
+---
+
+`)
+
+ b.Build(BuildCfg{})
+
+ // Should link to the HTML version.
+ b.AssertFileContent("public/sitemap.xml", " <loc>http://example.com/blog/html-amp/</loc>")
+}