Properly handle dashes in paths the same way we treated underscores when generating page titles. This includes sitemaps, sidebar nav trees and the page title header itself.
This commit is contained in:
parent
5dbd9b27e2
commit
328c6a394e
@ -24,7 +24,7 @@ fn nav_tree {
|
|||||||
|
|
||||||
bname = $NF d
|
bname = $NF d
|
||||||
path = $0 d
|
path = $0 d
|
||||||
gsub("_", " ", bname)
|
gsub(/[\-_]/, " ", bname)
|
||||||
|
|
||||||
if(index(ENVIRON["req_path"] "/", path) == 1)
|
if(index(ENVIRON["req_path"] "/", path) == 1)
|
||||||
print "<li><a href=\"" path "\" class=\"thisPage\">»<i> " bname "</i></a></li>"
|
print "<li><a href=\"" path "\" class=\"thisPage\">»<i> " bname "</i></a></li>"
|
||||||
|
@ -70,7 +70,7 @@ fn werc_exec_request {
|
|||||||
perm_redirect $req_path^'/'
|
perm_redirect $req_path^'/'
|
||||||
|
|
||||||
if(! ~ $#args 0)
|
if(! ~ $#args 0)
|
||||||
pageTitle=`{ echo $args|sed -e 's/([a-z])-([a-z])/\1 \2/g' -e 's/ / - /g' -e 's/_/ /g' }
|
ifs=$NEW_LINE { pageTitle=`{ echo $args|sed -e 's/ / - /g' -e 's/([a-z])-([a-z])/\1 \2/g' -e 's/_/ /g' } }
|
||||||
|
|
||||||
cd $sitedir
|
cd $sitedir
|
||||||
req_paths_list='/' # Note: req_paths_list doesn't include 'stnythetic' dirs.
|
req_paths_list='/' # Note: req_paths_list doesn't include 'stnythetic' dirs.
|
||||||
|
@ -47,7 +47,7 @@ fn listDir {
|
|||||||
u=`{echo $i|sed 's!'$sitedir'!!; '$dirclean's!/index$!/!; '}
|
u=`{echo $i|sed 's!'$sitedir'!!; '$dirclean's!/index$!/!; '}
|
||||||
if(! ~ $#desc 0 && ! ~ $desc '')
|
if(! ~ $#desc 0 && ! ~ $desc '')
|
||||||
desc=' - '$"desc
|
desc=' - '$"desc
|
||||||
n=`{echo /$u|sed 's/_/ /g; s,.*/([^/]+)/?$,\1,'}
|
n=`{echo /$u|sed 's/[\-_]/ /g; s,.*/([^/]+)/?$,\1,'}
|
||||||
echo '<li><a href="'$base_url$u'">'^$"n^'</a>' $"desc '</li>'
|
echo '<li><a href="'$base_url$u'">'^$"n^'</a>' $"desc '</li>'
|
||||||
echo $base_url^$u >> $tmpfile
|
echo $base_url^$u >> $tmpfile
|
||||||
if(test -d $i)
|
if(test -d $i)
|
||||||
|
Loading…
Reference in New Issue
Block a user