mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-03 04:02:38 +00:00
230a495941
93f7baf80netlify: Hugo 0.92.2ecd8a6b6bMerge branch 'tempv0.92.2'ee04caf9fFix validation of Page Kind in cascade target map3fce03ed2Remove the "check" command70ad71b25Fix typo (#1651)dfd1dc570Fix internal link (#1650)b5e0e0d38Update rotten Fedora package link78276390aAdd missing word in types.md (#1645)45eb945f8Remove hugo gen autocomplete2f84d0896netlify: Hugo 0.92.1b55f5773bUpdate complement.md7013ee43eRemove deprecated RSSLink from page variables1c3fb6ed3Remove deprecated page vars (#1638)9bd0af3abUpdate union.md4576487a0Update symdiff.md58f1b26c7Update starter-kits.md (#1521)285356c1dMove inline partials section (#1635)4d08625d2Improve directions for editing Win 10 path env var (#1632)41d9c7804Update page content (#1629)d05536cadRemoved unpaired quote character (#1630)3b0fdcd88netlify: Bump to Hugo 0.92.0cdb068346docs: Regenerate docshelper778503ca8Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb'2d2401c91docs: Add dependency table to maintainance page6bc95c386Add hugo.Deps19d0b5e23docs. Regen CLI docs76a750d96docs: Regenerate CLI docs70156962adocs: Regenerate docshelper git-subtree-dir: docs git-subtree-split:93f7baf80b
893 B
893 B
title, description, date, categories, menu, keywords, signature, hugoversion, aliases
| title | description | date | categories | menu | keywords | signature | hugoversion | aliases | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| complement | `collections.Complement` (alias `complement`) gives the elements of a collection that are not in any of the others. | 2018-11-07 |
|
|
|
|
0.51 |
Example:
{{ $pages := site.RegularPages | first 50 }}
{{ $news := where $pages "Type" "news" | first 5 }}
{{ $blog := where $pages "Type" "blog" | first 5 }}
{{ $other := $pages | complement $news $blog | first 10 }}
The above is an imaginary use case for the home page where you want to display different page listings in sections/boxes on different places on the page: 5 from news, 5 from the blog and then 10 of the pages not shown in the other listings, to complement them.