diff --git a/build_site.py b/build_site.py index ef592e866a68e57c5ceb751196b34dbf150ff7e1..a3ebce75079029433b1a749a102baa503ebaea9a 100644 --- a/build_site.py +++ b/build_site.py @@ -21,7 +21,7 @@ shutil.copytree("static", "public/", dirs_exist_ok=True) # Load projects projects = [] files = os.listdir("templates/projects") -files.sort() +files.sort(reverse=True) for filename in files: filepath = os.path.join("templates", "projects", filename) if os.path.isfile(filepath) and filepath.endswith(".json"): @@ -38,8 +38,6 @@ for filename in files: # Add to projects projects.append(project) -projects.reverse() # Reverse items so newest is at the top - # Format template template = env.get_template("index.html") with open("public/index.html", "w") as f: