fix dates for articles

This commit is contained in:
davidovski 2023-07-25 20:19:09 +02:00
parent 15f47f7bd7
commit 110f01efaf
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ cat << EOF
<ul> <ul>
EOF EOF
# list all the files in the directory # 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="$(grep '^# ' $file)"
title=${title#\# } title=${title#\# }
@ -34,7 +34,7 @@ for file in entries/*.html; do
<span>%s</span> <span>%s</span>
</a> </a>
</li> </li>
" "${file%.*}.html" "$(stat -c %z "$file")" "$title" " "${file%.*}.html" "$(git log --pretty=format:'%cd' "$file" | tail -n 1)" "$title"
done done
cat << EOF cat << EOF

View File

@ -17,7 +17,7 @@ for entry in entries/*.html; do
printf "<item>\n" printf "<item>\n"
printf "<title>%s</title>\n" "${title}" printf "<title>%s</title>\n" "${title}"
printf "<link>%s</link>\n" "http://davidovski.xyz/$entry" printf "<link>%s</link>\n" "http://davidovski.xyz/$entry"
printf "<pubDate>%s</pubDate>\n" "$(stat -c %z "$entry")" printf "<pubDate>%s</pubDate>\n" "$(git log --pretty=format:'%cd' "$entry" | tail -n 1 )"
printf "<description><![CDATA[" printf "<description><![CDATA["