Reverse menu listing of blog items.

This commit is contained in:
uriel 2008-05-31 06:22:58 +02:00
parent cb3640e717
commit e37ed0f709

View File

@ -30,7 +30,11 @@ dirfilter = '/\/[._]/d; s,^\./,,; s,\.md$,,; s,\.html,,;'
# Sidebar
fn menu {
ls -F $1 | sed $dirfilter | awk -F/ '
lsArgs = ( '-F' )
if (! ~ $#blogDirs 0) {
lsArgs = ($lsArgs -r)
}
ls $lsArgs $1 | sed $dirfilter | awk -F/ '
BEGIN { print "<ul class=\"sidebar\">" }
END { print "</ul>" }
/^([a-zA-Z0-9+_\-]+[\/*]?)+$/ && $NF != "index" {