X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/d5e65e582a34ae2494fee493ddcb2b959e4a4bce..7a1d5632b8c762ad7b00e1e834b5678ec9299bda:/doc/todo/index.html_allowed.mdwn diff --git a/doc/todo/index.html_allowed.mdwn b/doc/todo/index.html_allowed.mdwn index 13ed49211..f5e6f8cd7 100644 --- a/doc/todo/index.html_allowed.mdwn +++ b/doc/todo/index.html_allowed.mdwn @@ -91,15 +91,15 @@ page "A/B/index.html" is treated as "A/B". +++ ikidev/IkiWiki.pm 2007-02-25 15:05:22.328852000 -0800 @@ -192,6 +192,12 @@ return $untainted; - } #}}} + } - +sub titlename($;@) { #{{{ + +sub titlename($;@) { + my $page = shift; + $page =~ s!/index$!!; + return pagetitle(basename($page), @_); - +} #}}} + +} + - sub basename ($) { #{{{ + sub basename ($) { my $file=shift; @@ -117,8 +117,10 @@ diff -ru ikiwiki-2.4/IkiWiki.pm ikiwiki/IkiWiki.pm $page=~s/\Q.$type\E*$// if defined $type; + $page=~s/\/index$// if $page =~ /\/index$/; return $page; - } #}}} + } -This just makes it so that all files named foo/index become pages called foo, which is the desired effect. I haven't tested everything so far, so be careful! But you can see it working at http://ikidev.betacantrips.com/one/ again, as before. --Ethan \ No newline at end of file +This just makes it so that all files named foo/index become pages called foo, which is the desired effect. I haven't tested everything so far, so be careful! But you can see it working at http://ikidev.betacantrips.com/one/ again, as before. --Ethan + +[[done]], the indexpages setting enables this.