mirror of
https://github.com/andwati/andwati.com.git
synced 2026-11-22 08:28:49 +00:00
completed archive feature
This commit is contained in:
+15
-8
@@ -1,9 +1,16 @@
|
||||
{% for year, posts in section.pages | group_by(attribute="year") %}
|
||||
<h2>{{ year }}</h2>
|
||||
{% extends 'base.html' %} {% block content %} {% set section=
|
||||
get_section(path="blog/_index.md")%} {% for year,posts in section.pages |
|
||||
sort(attribute="date") | reverse | group_by(attribute="year")%}
|
||||
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<li><a href="{{ post.permalink }}">{{ post.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
<div class="archive">
|
||||
<h2>{{ year }}</h2>
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<li>
|
||||
<time> {{post.date | date(format="%d-%h")}} </time>
|
||||
<a href="{{ post.permalink }}">{{ post.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %} {% endblock content %}
|
||||
|
||||
Reference in New Issue
Block a user