I am trying to find the right function to get the first of many page objects/arrays/items.
For instance I am grouping posts by date:
{{ range (where .Site.Pages "Section" "post").GroupByDate "January 2006"}}
How would I “grab” the first of the pages in this array so I can work through it with .Date
and .Title
aso.?
I would guess it’s something like .Pages.0.Date
but that does not work. Also thought that “slice” would be a function that helps here, but the way I read the documentation this is more a string thing?
I tried to work with an index in the range command, but somehow only produce errors due to the .GroupByDate
part.
Any help is appreciated