moldu

Python script using Flask to generate a simple ssg
Log | Files | Refs

commit 92396ba41ca3df07ba887a60776d34cc419d239d
parent 5aeaf95a19e50082af6c829ba00f6ba0e3cff922
Author: Justin Bridouz <justin.bridouz@zaclys.net>
Date:   Fri, 27 Sep 2019 11:03:58 +0200

sorted posts for tag pages

Diffstat:
moldu.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/moldu.py b/moldu.py @@ -62,8 +62,9 @@ def index(): def tag(tag): tagged = [p for p in pages if tag in p.meta.get('tags', [])] hpages = [page for page in pages if "date" not in page.meta] + latest = sorted(tagged, reverse=True, key=lambda p: p.meta['date']) years = get_years(tagged) - return render_template('tag.html', pages=tagged, tag=tag, hpages=hpages, years = years) + return render_template('tag.html', pages=latest, tag=tag, hpages=hpages, years = years) @app.route('/archives/') def archives():