I have two areas in html that I want to look different but pull from the same content.
I want area one to just pull the latest .md from a section, and area two to pull all the rest of the .md files.
Edit: this almost works - except the value of the $index is the path to the .md, not an integer.
{{ range $index, where .Pages.ByDate "Section" "my-section" }}
{{ if eq $index 1 }}
...code
{{ else }}
..code
{{ end }}
{{ end }}
Edit: this does work with two ranges. Is it better practice to have one?
{{ range first 1 (where .Pages "Section" "my-section") }}
...
{{ end }}
{{ range after 1 (where .Pages "Section" "my-section") }}
...
{{ end }}