]> sipb.mit.edu Git - ikiwiki.git/commitdiff
append index.html to url generated by urlto("")
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 15 Jun 2008 19:04:10 +0000 (15:04 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 15 Jun 2008 19:04:26 +0000 (15:04 -0400)
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.

IkiWiki.pm
debian/changelog

index a9debfb7dc86f3ba51be46a1f4ba011703017b54..7d5668d74d6899f08019b964517223b693606db5 100644 (file)
@@ -547,7 +547,7 @@ sub urlto ($$) { #{{{
        my $from=shift;
 
        if (! length $to) {
        my $from=shift;
 
        if (! length $to) {
-               return beautify_url(baseurl($from));
+               return beautify_url(baseurl($from)."index.$config{htmlext}");
        }
 
        if (! $destsources{$to}) {
        }
 
        if (! $destsources{$to}) {
index 721e7dfbc1091bfce42fac035bbdf4edd0382ec3..11a100c0d8814b1c82e695e228cec4a7742fc1dc 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (2.51) UNRELEASED; urgency=low
+
+  * Improve toplevel parentlink to link directly to index.html when usedirs is
+    disabled.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 15 Jun 2008 15:03:33 -0400
+
 ikiwiki (2.50) unstable; urgency=low
 
   * img: Support captions.
 ikiwiki (2.50) unstable; urgency=low
 
   * img: Support captions.