Add some new debug facilities, and also fix a minnor bug in the new blog-sidebar-menu
This commit is contained in:
parent
d4428fddea
commit
c2fe445b82
@ -38,10 +38,9 @@ fn hide_paths {
|
||||
fn menu {
|
||||
lsArgs = ('-F')
|
||||
# XXX will not work properly for $#blogDirs > 1 and matching is hackish
|
||||
if ( (! ~ $#inBlog 0) || ! ~ $#blogDirs 0 && (~ $blogDirs^/ *$1 *$1/) ) { # Work in progress XXX
|
||||
if ( ! ~ $#inBlog 0 || ! ~ $#blogDirs 0 && ~ $blogDirs^/ *$1 *$1/ ) { # Work in progress XXX
|
||||
lsArgs = ($lsArgs -r)
|
||||
}
|
||||
|
||||
ls $lsArgs $1 | sed $dirfilter | awk -F/ '
|
||||
BEGIN { print "<ul class=\"sidebar\">" }
|
||||
END { print "</ul>" }
|
||||
@ -146,6 +145,14 @@ fn genbody {
|
||||
|
||||
. etc/initrc
|
||||
|
||||
fn dprint {
|
||||
echo $* >[1=2]
|
||||
}
|
||||
|
||||
if(! ~ $#debug 0) {
|
||||
echo $SERVER_NAME - $REQUEST_URI - >[1=2]
|
||||
}
|
||||
|
||||
if (! ~ $args '') {
|
||||
#title=$args($#args)
|
||||
title=$args
|
||||
@ -169,7 +176,6 @@ for (i in ('' $args)) {
|
||||
inBlog = 'yes'
|
||||
}
|
||||
|
||||
echo $body $redirectPermanent>> /tmp/foo
|
||||
# Redirections and other preprocessing
|
||||
if (~ $#redirectPermanent 1) {
|
||||
echo 'Status: 301 Moved Permanantly
|
||||
@ -211,7 +217,6 @@ if(! ~ $#blogDirs 0 || ! ~ $#inBlog 0) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
fn template {
|
||||
template.awk | rc $rcargs |
|
||||
awk '{
|
||||
|
@ -1,3 +1,4 @@
|
||||
masterSite=cat-v.org
|
||||
siteTitle='cat-v'
|
||||
siteSubTitle='Considered harmful'
|
||||
debug=true
|
||||
|
Loading…
Reference in New Issue
Block a user