Skip to content
Snippets Groups Projects
Verified Commit 24fdf9dd authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Sort reversed to start with

parent 5b647f14
Branches
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment