From 2ab303fb2ecbd8127aa6a44c026979d502c3b392 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Tue, 9 Jan 2024 17:26:15 -0500 Subject: [PATCH] Reversed sorting order so that the site map displays posts from newest to oldest --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index eb57a33..247ff4c 100755 --- a/build.sh +++ b/build.sh @@ -143,7 +143,7 @@ gen_sorted_file_list() { # Generate a list of the HTMl files, sorted by when the paste $BASE_PATH/temp/file_listing.txt $BASE_PATH/temp/date_mod.txt > $BASE_PATH/temp/new_file_list.txt # Combine file list and date modified into a single file - sorted_file_list=$(sort -k 2 $BASE_PATH/temp/new_file_list.txt) # Sort the data in the file, and store it into a variable + sorted_file_list=$(sort -r -k 2 $BASE_PATH/temp/new_file_list.txt) # Sort the data in the file based on the timestamp (from newest to oldest), and store it into a variable sorted_file_list=$(echo "$sorted_file_list" | awk '{print $1}') # Store only the first column (the file path) in the variable }