Commit a8a34a6f authored by berumuron's avatar berumuron
Browse files

add: Provide articles by year in blog page

parent 795bce1a
import os
import shutil
import itertools
import boop.boopsy as boopsy
from boop.atom import Atom
......@@ -50,6 +51,9 @@ def build_blog_page(articles, configuration):
blog_page = Page("blog", "", configuration=configuration)
blog_page.meta["PAGE_TEMPLATE"] = "blog"
blog_page.meta["ARTICLES"] = articles
blog_page.meta["ARTICLES_BY_YEAR"] = itertools.groupby(
articles, key=lambda article: article.date().year
)
return blog_page
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment