aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-06-15 15:04:10 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-06-15 15:04:26 -0400
commit5e6a6b1086d09ec9566c14ddcb89a41546efcfe6 (patch)
tree50e48963f5d9e8dd55bc3cc57747095ae5adc326 /IkiWiki.pm
parent0415917f1eaa170e47f338066fb0d52b65f7111c (diff)
downloadikiwiki-5e6a6b1086d09ec9566c14ddcb89a41546efcfe6.tar
ikiwiki-5e6a6b1086d09ec9566c14ddcb89a41546efcfe6.tar.gz
append index.html to url generated by urlto("")
This special case crops up when generating the parentlink to the toplevel index page. urlto("") had been generating a link to "./" (or "../" etc) for that, which is fine, if the web server redirects that to the toplevel index.html. It's less fine if there is no web server. I actually ran into the problem first when using gopher. (Yes, yes, don't laugh.. see upcoming tip.) But it also crops up when browsing local wiki files. Of course, the index.html is stripped back off if usedirs is enabled.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index a9debfb7d..7d5668d74 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -547,7 +547,7 @@ sub urlto ($$) { #{{{
my $from=shift;
if (! length $to) {
- return beautify_url(baseurl($from));
+ return beautify_url(baseurl($from)."index.$config{htmlext}");
}
if (! $destsources{$to}) {