From 9029ab3a0a2e3bb998b8df10d5b028f015209ccb Mon Sep 17 00:00:00 2001 From: Sebastian Elisa Pfeifer Date: Fri, 23 Oct 2020 17:43:39 +0200 Subject: [PATCH] Reverse sorting as quick fix for issue #1 --- staticSiteGenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticSiteGenerator.py b/staticSiteGenerator.py index 8a68bf9..7d9a691 100755 --- a/staticSiteGenerator.py +++ b/staticSiteGenerator.py @@ -72,7 +72,7 @@ def isbnFormatFunction(isbnToFormat): logger.info("Locations: {0}".format(recordsToWrite.keys())) templateVars = { - "locations": recordsToWrite.keys(), + "locations": sorted(recordsToWrite.keys(), reverse=True), "firstLocation": list(recordsToWrite.keys())[0], "generationTime": datetime.datetime.now().astimezone().replace(microsecond=0).isoformat(), "records": recordsToWrite,