]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/toplevel_index.mdwn
web commit by JoshTriplett: Outline implementation plan.
[ikiwiki.git] / doc / todo / toplevel_index.mdwn
1 Some inconsistences around the toplevel [[index]] page:
2
3 * [[ikiwiki]] is a separate page; links to [[ikiwiki]] should better go to
4   the [[index]] though.
5 * The toplevel [[ikiwiki/Discussion]] page has some weird parentlinks
6   behavior. This could be special cased around with the following patch.
7   However, I'm unsure if I like the idea of more special cases around this.
8   It would be better to find a way to make the toplevel index page not be a
9   special case at all.
10
11 Here is a patch:
12
13         --- IkiWiki/Render.pm   (revision 1187)
14         +++ IkiWiki/Render.pm   (working copy)
15         @@ -71,6 +71,7 @@
16                 my $path="";
17                 my $skip=1;
18                 return if $page eq 'index'; # toplevel
19         +       $path=".." if $page=~s/^index\///;
20                 foreach my $dir (reverse split("/", $page)) {
21                         if (! $skip) {
22                                 $path.="../";
23
24 ---
25
26 > I would like to suggest another tack, namely a bigger, better special case. 
27 > The basic idea is that all indices of the form foo/bar/index get the wiki path foo/bar.
28 > This makes some things more elegant:
29 >
30 > * All files having to do with foo/bar are in the foo/bar directory, rather 
31 >   than the (admittedly minor) wart of having the index be in foo/.
32 > * This sort of addresses [[bugs/broken_parentlinks]] in that example/ is 
33 >   guaranteed to be a valid path. (There might be no index there, though.)
34 > * This is more in line with standard HTML practice, as far as I understand it,
35 >   namely that linking to a/b means a/b/index.html rather than a/b.html.
36 >
37 > This would change the inline plugin in strange ways -- I think if foo/index.html
38 > contains \[[inline "* and !*/Discussion"]], it should skip inlining foo/index.html 
39 > explicitly, but would inline index pages in child directories 
40 > foo/bar/baz/index.html as bar/baz.
41 >
42 > It always bothers me that foo/bar/ files need a foo/bar.html in front of them, 
43 > rather than a foo/bar/index.html, as is (to my mind) traditional.
44
45 > Ethan
46 >
47 > Hmm, now I've had time to think about this, and this does conflict pretty hard with foo.html/Discussion 
48 > pages. Well, back to the drawing board.
49 >
50 > Well, it seems unlikely that you'll have both foo/bar.html and foo/bar/index.html, 
51 > so why not accept either as foo/bar? This would both preserve backwards
52 > compatibility, as well as allow foo/bar/Discussion.
53 >
54 > Ethan
55 >
56 > No, in order for this to work, the wiki path foo/bar/baz could be any of:
57 >
58 > * foo/bar/baz.html
59 > * foo/index/bar/index/baz.html
60 > * foo/bar/index/baz.html
61 > * foo/bar/index/baz/index.html
62 >
63 > Or many others. Which is probably even hackier than having both foo.html and foo/.
64 >
65 > Ethan