Howto: Custom archive page for all blog posts, per year

I’m a Hugo beginner. I’m asking this because I’m still learning.

I had the same problem with the dangling ‘post’ entry. I solved it by using range where.



{{ range where .Site.Pages "Section" "post" }}
  {{ range (.Pages.GroupByDate "2006") }}
    -year key
    {{ range (.Pages.GroupByDate "1") }}
      - month key
      {{ range .Pages}}
        {{ .Render "summary" }}
      {{ end }}
    {{ end }}
  {{ end }}
{{ end }}

My question is: are there any reasons not to use this construct? I like it more because I do not have to use .Data which makes it a bit easier for me to comprehend whilst reading.