Repository: gohugoio/hugo (language: go)

Issue:
uglyurls not support map[string]bool
uglyurls support is configured as map[string]bool according to the following link 

- https://github.com/gohugoio/hugo/blob/9b635522e28e507c49e558e537157c932398981c/config/allconfig/allconfig.go#L335-L344 
- https://github.com/gohugoio/hugo/blob/9b635522e28e507c49e558e537157c932398981c/config/allconfig/alldecoders.go#L413-L428

but not work

because v is `maps.Params[_merge:none post:true]` in `p.c.UglyURLs = cast.ToStringMapBool(v)`, `none` should be clean
uglyurls not support map[string]bool
uglyurls support is configured as map[string]bool according to the following link 

- https://github.com/gohugoio/hugo/blob/9b635522e28e507c49e558e537157c932398981c/config/allconfig/allconfig.go#L335-L344 
- https://github.com/gohugoio/hugo/blob/9b635522e28e507c49e558e537157c932398981c/config/allconfig/alldecoders.go#L413-L428

but not work

because v is `maps.Params[_merge:none post:true]` in `p.c.UglyURLs = cast.ToStringMapBool(v)`, `none` should be clean


Discussion / hints:

Fix patch:
diff --git a/config/allconfig/alldecoders.go b/config/allconfig/alldecoders.go
index 45cdd0de6a7..60e57199940 100644
--- a/config/allconfig/alldecoders.go
+++ b/config/allconfig/alldecoders.go
@@ -419,6 +419,8 @@ var allDecoderSetups = map[string]decodeWeight{
 				p.c.UglyURLs = vv
 			case string:
 				p.c.UglyURLs = vv == "true"
+			case maps.Params:
+				p.c.UglyURLs = cast.ToStringMapBool(maps.CleanConfigStringMap(vv))
 			default:
 				p.c.UglyURLs = cast.ToStringMapBool(v)
 			}


Test patch:
diff --git a/config/allconfig/allconfig_integration_test.go b/config/allconfig/allconfig_integration_test.go
index debdff65011..38e763b70c4 100644
--- a/config/allconfig/allconfig_integration_test.go
+++ b/config/allconfig/allconfig_integration_test.go
@@ -160,3 +160,18 @@ title: "p3"
 	b.AssertFileExists("public/page/1/index.html", false)
 	b.AssertFileContent("public/page/2/index.html", "pagination-default")
 }
+
+func TestMapUglyURLs(t *testing.T) {
+	files := `
+-- hugo.toml --
+[uglyurls]
+  posts = true
+`
+
+	b := hugolib.Test(t, files)
+
+	c := b.H.Configs.Base
+
+	b.Assert(c.C.IsUglyURLSection("posts"), qt.IsTrue)
+	b.Assert(c.C.IsUglyURLSection("blog"), qt.IsFalse)
+}