diff --git a/pre-commit.py b/pre-commit.py index ce87ee1..ef4faa0 100755 --- a/pre-commit.py +++ b/pre-commit.py @@ -702,3 +702,42 @@ for i in years_list: page_year_fh.write(page_year) except IOError: sys.exit("[ERROR] Unable to write index file for "+i+".") + +# Generate archive page +archives = header.replace("@title", params["BLOG_TITLE"]+" - Archives", 1) + +years_list = os.listdir("blog/") +years_list.sort(reverse=True) + +archives += "