Я переписываю свой блог, чтобы использовать Jekyll. Jekyll использует язык шаблонов Liquid, поэтому он немного усложняет процесс настройки.
Я хотел бы сгруппировать свой список сообщений в блогах по годам. Как я могу написать код Liquid, чтобы это сделать?
{% for post in site.posts %}
<li><!-- display post year here (but only once, per year) --></li>
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}