mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
output: Prevent setting Name directly in new output formats
Name is derived from the map key. Closes #11947
This commit is contained in:
@@ -65,10 +65,10 @@ func DecodeConfig(mediaTypes media.Types, in any) (*config.ConfigNamespace[map[s
|
||||
}
|
||||
|
||||
newOutFormat := defaultOutputFormat
|
||||
newOutFormat.Name = k
|
||||
if err := decode(mediaTypes, v, &newOutFormat); err != nil {
|
||||
return f, nil, err
|
||||
}
|
||||
newOutFormat.Name = k
|
||||
|
||||
f = append(f, newOutFormat)
|
||||
|
||||
|
Reference in New Issue
Block a user