I have a functioning template partial for my sidebar that lists the years of posts:
<aside class="card mb-3" id="widget_archive">
<h3 class="card-header">
Archiv
</h3>
<div class="card-body">
<div class="card-text grid-container">
{{ range (where .Site.Pages "Section" "posts").GroupByDate "2006" "desc" }}
{{ range first 1 .Pages }}
<a href="/archiv/{{ .Date.Format "2006" }}">
{{ .Date.Format "2006" }}
</a>
{{ end }}
{{ end }}
</div>
</div>
</aside>
It works now, but the {{ range first 1 .Pages }}
seems to be triggering the famous “hey, in 0.58 it won’t work anymore” message.
Question 1: Is this a false positive?
Question 2: I have the faint feeling that this code is not really the optimal thing to do what I want to do (a list of links per year of posts in my blog).