diff --git a/src/index.ps b/src/index.ps index 490186b..f916212 100644 --- a/src/index.ps +++ b/src/index.ps @@ -20,11 +20,12 @@ EOF # print list ls -r1 *.ps *.pm *.ph *.pa *.pt 2>/dev/null | fgrep -v '.draft.' | while read line do + DATE=$(echo "$line" | cut -d_ -f1 ) if [ $(echo "${line##*.}") == "pm" ] then - TITLE="$(head -1 "$line" | sed 's/^# //g')" + TITLE="$DATE - $(head -1 "$line" | sed 's/^# //g')" else - TITLE="$(echo "${line%%.*}" | tr '_' ' ')" + TITLE="$DATE - $(echo "${line%%.*}" | tr '_' ' ')" fi URI="posts/${line%.*}.html"