merge
少于1分钟
将以下英文翻译为中文:
merge
https://gohugo.io/functions/merge/
Returns the result of merging two or more maps.
语法
collections.Merge MAP MAP...
merge MAP MAP...
Returns the result of merging two or more maps from left to right. If a key already exists, merge updates its value. If a key is absent, merge inserts the value under the new key.
Key handling is case-insensitive.
The following examples use these map definitions:
| |
Example 1
| |
Example 2
| |
Example 3
| |
Example 4
| |
Regardless of depth, merging only applies to maps. For slices, use append.
另请参阅
最后修改 June 1, 2023: 新增一个配置参数:sidebar_menu_truncate = 500 用于解决菜单不全的问题 (27810f1)