Commit ecd43a7e authored by Marien Fressinaud's avatar Marien Fressinaud

add: Sort articles by publication date (reversed)

It's more logical to have the latest published articles on the top of
the list in the console output and in the Atom feed.
parent 4732f1b5
......@@ -190,6 +190,9 @@ def main():
if len(articles) == 0:
return
# Sort the articles by publication date
articles.sort(key=lambda article: article.date(), reverse=True)
# And write them in the ./site folder
for article in articles:
output_filepath = os.path.join(output_path, f"{article.slug()}.html")
......
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