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