reverse blog index

This commit is contained in:
yosh 2024-01-02 18:45:42 -06:00
parent 2be3677944
commit 02fab8bf57
1 changed files with 5 additions and 2 deletions

View File

@ -10,7 +10,8 @@
<ul>
<?shp
for md in *.md; do
while read -r md; do
md=${md##*/}
# title is always on first line and always separated by a space
read -r title < "$md"
title=$(__lowdown <<-EOF
@ -22,7 +23,9 @@
set_md_metadata "$md"
printf '<li><p><time>%s</time> - <a href="%s">%s</a></li>\n' \
"${POST_TIME%%T*}" "${md%.md}.html" "$title"
done
done <<-EOF
$(find . -type f -name '*.md' | sort -r)
EOF
?>
</ul>