Reversed sorting order so that the site map displays posts from newest to oldest

master
Aadhavan Srinivasan 12 months ago
parent 1a477a1abf
commit 2ab303fb2e

@ -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 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 sorted_file_list=$(echo "$sorted_file_list" | awk '{print $1}') # Store only the first column (the file path) in the variable
} }

Loading…
Cancel
Save