{{ if site.Params.publications.index.group_by_year }} {{ $publications := .Paginator.Pages.GroupByDate "2006" }} {{ range $publications }}

{{ .Key }}

{{ range .Pages }} {{ partial "publications/publication.html" (dict "publication" . ) }} {{ end }}
{{ end }} {{ else }} {{ range .Paginator.Pages }} {{ partial "publications/publication.html" (dict "publication" . ) }} {{ end }} {{ end }}