forked from github.com/blag
Split Archive into Index and Archive
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ site.title }}{% endblock %}
|
||||
{% block title %}Archive{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for entry in archive %}
|
||||
|
||||
@@ -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
23
blag/templates/index.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user