From: MatthewOwens <matthew@owens.tech>
Date: Tue, 21 Jul 2020 16:40:40 +0000 (+0100)
Subject: sorting posts
X-Git-Url: https://git.owens.tech/assets/dummy.html/assets/dummy.html/git?a=commitdiff_plain;h=edbf8af0b005beb35fc6a24c9365a9cbc543ab49;p=website.git

sorting posts
---

diff --git a/scripts/gen_index.sh b/scripts/gen_index.sh
index 8fb0297..da61039 100755
--- a/scripts/gen_index.sh
+++ b/scripts/gen_index.sh
@@ -8,7 +8,7 @@ MATCH="^([0-9]{1,4})-([0-9]{1,4})-([0-9]{1,4})-([^\.]+)(.*)"
 
 sed "s|TITLE|<title>Matthew Owens</title>|" includes/head.html
 cat includes/header.html
-ls $POSTS_DIR | sed -Ee 's/ /\n/' -e "s/$MATCH/\1 \2 \3 \4/" | awk -f scripts/posts.awk
+ls $POSTS_DIR | sort -nr | sed -Ee 's/ /\n/' -e "s/$MATCH/\1 \2 \3 \4/" | awk -f scripts/posts.awk
 echo "<div id=\"about-section\">"
 markdown about.md
 echo "</div>"