Fix sed snafu.
This commit is contained in:
parent
b52930acb7
commit
871ac385d9
1 changed files with 13 additions and 14 deletions
|
|
@ -25,7 +25,7 @@ fn gentitle {
|
||||||
echo '<h1 class="headerTitle"><a href="/">' ^ $"siteTitle ^ '<span id="headerSubTitle">' ^ $"siteSubTitle ^ '</span></a></h1>'
|
echo '<h1 class="headerTitle"><a href="/">' ^ $"siteTitle ^ '<span id="headerSubTitle">' ^ $"siteSubTitle ^ '</span></a></h1>'
|
||||||
}
|
}
|
||||||
|
|
||||||
dirfilter = '/\/./d; /\/_[^\/]*$/d; s,^\./,,; s,\.md$,,;'
|
dirfilter = '/\/\./d; /\/_[^\/]*$/d; s,^\./,,; s,\.md$,,;'
|
||||||
|
|
||||||
# Sidebar
|
# Sidebar
|
||||||
fn menu {
|
fn menu {
|
||||||
|
|
@ -34,7 +34,6 @@ fn menu {
|
||||||
END { print "</ul>" }
|
END { print "</ul>" }
|
||||||
/^([a-zA-Z0-9+_\-]+[\/*]?)+$/ && $NF != "index" {
|
/^([a-zA-Z0-9+_\-]+[\/*]?)+$/ && $NF != "index" {
|
||||||
isdir = match($0, "/$")
|
isdir = match($0, "/$")
|
||||||
|
|
||||||
sub("[*/]$", "")
|
sub("[*/]$", "")
|
||||||
|
|
||||||
bname = $0
|
bname = $0
|
||||||
|
|
@ -124,18 +123,6 @@ if (! ~ $#sidebar 0)
|
||||||
if (test -d $body)
|
if (test -d $body)
|
||||||
body=$body/index
|
body=$body/index
|
||||||
|
|
||||||
fn template {
|
|
||||||
template.awk | rc |
|
|
||||||
awk '{
|
|
||||||
buf = buf $0"\n"
|
|
||||||
if(length(buf) > 8192) {
|
|
||||||
printf "%s", buf
|
|
||||||
buf = ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
END{ printf "%s", buf }'
|
|
||||||
}
|
|
||||||
|
|
||||||
# RSS
|
# RSS
|
||||||
fn statpost {
|
fn statpost {
|
||||||
f = $1
|
f = $1
|
||||||
|
|
@ -157,6 +144,18 @@ fn statpost {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn template {
|
||||||
|
template.awk | rc |
|
||||||
|
awk '{
|
||||||
|
buf = buf $0"\n"
|
||||||
|
if(length(buf) > 8192) {
|
||||||
|
printf "%s", buf
|
||||||
|
buf = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
END{ printf "%s", buf }'
|
||||||
|
}
|
||||||
|
|
||||||
if(! ~ $REQUEST_URI */index.rss) {
|
if(! ~ $REQUEST_URI */index.rss) {
|
||||||
cat $headers $template | template
|
cat $headers $template | template
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue