Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'

This commit is contained in:
Bjørn Erik Pedersen
2025-04-10 13:04:51 +02:00
987 changed files with 12379 additions and 14083 deletions

View File

@@ -3,14 +3,11 @@ title: collections.First
description: Returns the given collection, limited to the first N elements.
categories: []
keywords: []
action:
aliases: [first]
related:
- functions/collections/After
- functions/collections/Last
- methods/pages/Limit
returnType: any
signatures: [collections.First N COLLECTION]
params:
functions_and_methods:
aliases: [first]
returnType: any
signatures: [collections.First N COLLECTION]
aliases: [/functions/first]
---
@@ -23,7 +20,7 @@ aliases: [/functions/first]
Set `N` to zero to return an empty collection.
```go-html-template
{{ $emptyPageCollection := first 0 .Pages}}
{{ $emptyPageCollection := first 0 .Pages }}
```
Use `first` and [`where`] together.