Proper fix for the blog post sort issue

This commit is contained in:
uriel 2007-05-30 12:10:23 +02:00
parent 89a5535257
commit 6ffde63aa9

View File

@ -109,7 +109,8 @@ fn genbody {
if ( ~ $blog 'yes' && ~ $body */index.md ) {
if ( ! ~ $#blogTitle 0 )
echo '<h1>'$"blogTitle'</h1>'
for ( i in `{ ls $blogDirs | grep '[0-9]+.*\.md$'| sort -r -t. +1 } ) {
# the /./ is added so we can sort -t. and order only the file name
for ( i in `{ ls $blogDirs^'/./' | grep '[0-9]+.*\.md$'| sort -r -t. +1 } ) {
t=`{basename $i|sed -e 's/^[0-9\-]*_//' -e 's,\.md$,,' -e 's/_/ /g' }
du=`{ls -l $i }
#echo '<h2>' $"t '<small style="font-size: 70%">by '$"$du(4)' (Last mod: '$du(7) $du(8) $du(9)')</small></h2>'