summaryrefslogtreecommitdiff
path: root/site/index.html
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-25 20:19:09 +0200
committerdavidovski <david@davidovski.xyz>2023-07-25 20:19:09 +0200
commit110f01efafe760317970498ac9a64829bf69fb92 (patch)
treea9d8d07d14b787eae9f933a2c0470a2b521ca3b7 /site/index.html
parent15f47f7bd74cd0ade0c95a1234f243438b46ad15 (diff)
fix dates for articles
Diffstat (limited to 'site/index.html')
-rwxr-xr-xsite/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/site/index.html b/site/index.html
index 080a484..cf0fafa 100755
--- a/site/index.html
+++ b/site/index.html
@@ -23,7 +23,7 @@ cat << EOF
<ul>
EOF
# list all the files in the directory
-for file in entries/*.html; do
+for file in $(ls -t entries/*.html); do
title="$(grep '^# ' $file)"
title=${title#\# }
@@ -34,7 +34,7 @@ for file in entries/*.html; do
<span>%s</span>
</a>
</li>
-" "${file%.*}.html" "$(stat -c %z "$file")" "$title"
+" "${file%.*}.html" "$(git log --pretty=format:'%cd' "$file" | tail -n 1)" "$title"
done
cat << EOF