union
少于1分钟
将以下英文翻译为中文:
union
https://gohugo.io/functions/union/
Given two arrays or slices, returns a new array that contains the elements or objects that belong to either or both arrays/slices.
语法
union SET1 SET2
Given two arrays (or slices) A and B, this function will return a new array that contains the elements or objects that belong to either A or to B or to both. The elements supported are strings, integers, and floats (only float64).
| |
OR filter in where query
This is also very useful to use as OR filters when combined with where:
| |
The above fetches regular pages not of page or about type unless they are pinned. And finally, we exclude all pages with no images set in Page params.
See intersect for AND.
另请参阅
最后修改 June 1, 2023: 新增一个配置参数:sidebar_menu_truncate = 500 用于解决菜单不全的问题 (27810f1)