Sort articles on tag pages by publication date.
This commit is contained in:
parent
30672d0405
commit
66e6301c32
1 changed files with 3 additions and 2 deletions
|
@ -272,11 +272,11 @@ def maketagpage(index, path):
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% if index.articles %}
|
{% if articles %}
|
||||||
<section style="grid-area:articles">
|
<section style="grid-area:articles">
|
||||||
<h1>{{path}}</h1>
|
<h1>{{path}}</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for article in index.articles %}
|
{% for article in articles %}
|
||||||
<li>
|
<li>
|
||||||
<a href="/writing/{{article.web_path}}">{{article.title}}</a>
|
<a href="/writing/{{article.web_path}}">{{article.title}}</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -306,6 +306,7 @@ def maketagpage(index, path):
|
||||||
''').render(
|
''').render(
|
||||||
parent=parent,
|
parent=parent,
|
||||||
index=index,
|
index=index,
|
||||||
|
articles=sorted(index.articles, key=lambda a: a.date, reverse=True),
|
||||||
path=path,
|
path=path,
|
||||||
children=sorted(tag.name for tag in index.children.keys()),
|
children=sorted(tag.name for tag in index.children.keys()),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue