Split Archive into Index and Archive

This commit is contained in:
Bastian Venthur
2023-05-31 15:53:49 +02:00
parent a3572d414f
commit 362e721d88
9 changed files with 108 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ site.title }}{% endblock %}
{% block title %}Archive{% endblock %}
{% block content %}
{% for entry in archive %}

View File

@@ -20,6 +20,7 @@
<h2>{{ site.description }}</h2>
<ul>
<li><a href="/">Blog</a></li>
<li><a href="/archive.html">Archive</a></li>
<li><a href="/tags/">Tags</a></li>
<li><a href="/atom.xml">Atom Feed</a></li>
</ul>

23
blag/templates/index.html Normal file
View File

@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block title %}{{ site.title }}{% endblock %}
{% block content %}
{% for entry in archive[:10] %}
{% if entry.title %}
<h1><a href="{{entry.dst}}">{{entry.title}}</a></h1>
{% if entry.description %}
<p>— {{ entry.description }}</p>
{% endif %}
{% endif %}
<p>Written on {{ entry.date.date() }}.</p>
{% endfor %}
<p><a href="/archive.html">all articles...</a></p>
{% endblock %}