mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-16 11:54:34 -04:00
Update merge.md
This commit is contained in:
parent
fd0f04f69e
commit
68a956272f
@ -7,7 +7,7 @@ menu:
|
||||
docs:
|
||||
parent: "functions"
|
||||
keywords: [dictionary]
|
||||
signature: ["$params := merge $default_params $user_params", $params := $default_params | merge $user_params]
|
||||
signature: ["$params := merge $default_params $user_params"]
|
||||
workson: []
|
||||
hugoversion: "0.56.0"
|
||||
relatedfuncs: [dict, append, reflect.IsMap, reflect.IsSlice]
|
||||
@ -19,7 +19,7 @@ An example merging two maps.
|
||||
```go-html-template
|
||||
{{ $default_params := dict "color" "blue" "width" "50%" "height" "25%" }}
|
||||
{{ $user_params := dict "color" "red" "extra" (dict "duration" 2) }}
|
||||
{{ $params := $default_params | merge $user_params }}
|
||||
{{ $params := merge $default_params $user_params }}
|
||||
```
|
||||
|
||||
Resulting __$params__:
|
||||
|
Loading…
x
Reference in New Issue
Block a user