| Rename $baseuri to $base_url - swerc - anselm's simpler werc fork | |
| git clone git://git.suckless.org/swerc | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 66840ad19037234f9f7d85c70a348bd0117016a2 | |
| parent 27a149e8038abc12616729ac01e2189ad895fa13 | |
| Author: [email protected] <unknown> | |
| Date: Sun, 28 Dec 2008 20:20:48 +0100 | |
| Rename $baseuri to $base_url | |
| Diffstat: | |
| M bin/werc.rc | 6 +++--- | |
| M lib/sitemap.tpl | 2 +- | |
| 2 files changed, 4 insertions(+), 4 deletions(-) | |
| --- | |
| diff --git a/bin/werc.rc b/bin/werc.rc | |
| @@ -157,7 +157,7 @@ fn select_handler { | |
| uri=`{echo $uri | sed 's/index.(rss|atom)$//'} | |
| if(~ $#blogDirs 0) | |
| blogDirs=$sitedir^'/'$uri | |
| - uri=$baseuri$"uri | |
| + uri=$base_url$"uri | |
| if(~ $REQUEST_URI */index.rss) | |
| master_template=feeds/rss20.tpl | |
| @@ -170,7 +170,7 @@ fn select_handler { | |
| if(~ $#blogDirs 0) | |
| blogDirs=`{basename -d $body} | |
| - u=`{cleanname $baseuri^`{basename -d '/'^$uri}|sed 's,:/,://,'} # Sed … | |
| + u=`{cleanname $base_url^`{basename -d '/'^$uri}|sed 's,:/,://,'} # Sed… | |
| extraHeaders=$"extraHeaders ^ \ | |
| '<link rel="alternate" type="application/rss+xml" title="RSS" href… | |
| <link rel="alternate" type="application/atom+xml" title="ATOM" href="'$"u'/ind… | |
| @@ -210,7 +210,7 @@ site=$SERVER_NAME | |
| headers=lib/headers.tpl | |
| master_template=default_master.tpl | |
| sidebar=sidebar | |
| -baseuri=http://$site/ | |
| +base_url=http://$site/ | |
| current_date_time=`{date} | |
| for(i in siteTitle siteSubTitle pageTitle extraHeaders) | |
| $i = '' | |
| diff --git a/lib/sitemap.tpl b/lib/sitemap.tpl | |
| @@ -47,7 +47,7 @@ fn listDir { | |
| desc=' - '$"desc | |
| tit=`{echo /$i|sed 's/_/ /g; s,.*/([^/]+)/?$,\1,'} | |
| echo '<li><a href="/'$i'">'^$"tit^'</a>' $"desc '</li>' | |
| - echo -n $baseuri^$i >> $tmpfile | |
| + echo -n $base_url^$i >> $tmpfile | |
| if(test -d $i) { | |
| echo / >> $tmpfile | |
| @{ listDir $i } |