mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
config: Fix _merge issue when key doesn't exist on the left side
Fixes #13643 Fixes #13646
This commit is contained in:
@@ -475,7 +475,7 @@ name = "menu-theme"
|
||||
})
|
||||
})
|
||||
|
||||
// Issue #8724
|
||||
// Issue #8724 ##13643
|
||||
for _, mergeStrategy := range []string{"none", "shallow"} {
|
||||
c.Run(fmt.Sprintf("Merge with sitemap config in theme, mergestrategy %s", mergeStrategy), func(c *qt.C) {
|
||||
smapConfigTempl := `[sitemap]
|
||||
@@ -495,7 +495,7 @@ name = "menu-theme"
|
||||
b.Assert(got.Sitemap, qt.DeepEquals, config.SitemapConfig{ChangeFreq: "", Disable: false, Priority: -1, Filename: "sitemap.xml"})
|
||||
b.AssertFileContent("public/sitemap.xml", "schemas/sitemap")
|
||||
} else {
|
||||
b.Assert(got.Sitemap, qt.DeepEquals, config.SitemapConfig{ChangeFreq: "monthly", Disable: false, Priority: -1, Filename: "sitemap.xml"})
|
||||
b.Assert(got.Sitemap, qt.DeepEquals, config.SitemapConfig{ChangeFreq: "monthly", Disable: false, Priority: 0.5, Filename: "sitemap.xml"})
|
||||
b.AssertFileContent("public/sitemap.xml", "<changefreq>monthly</changefreq>")
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user