update to actual generated example
[ikiwiki] / doc / bugs / map_is_inconsistent_about_bare_directories.mdwn
1 The [[plugins/map]] plugin has inconsistent behaviour.  In particular, I have in my wiki some directory structures holding files without wikitext pointers (I point directly to the files from elsewhere).  For example, imagine the following file structure in the source dir:
2
3     ; ls -R dirA dirB
4     dirA:
5     subA        subB
6     
7     dirA/subA:
8     filea.mdwn  fileb.mdwn
9     
10     dirA/subB:
11     filec.mdwn  filed.mdwn
12     
13     dirB:
14     subA        subC
15     
16     dirB/subA:
17     filea.mdwn
18     
19     dirB/subC:
20     fileb.mdwn  filec.mdwn
21
22 When I use map to make a map of this, the result looks more like this:
23
24 <ul>
25 <li><span class="createlink">? dirA</span>
26 <ul>
27 <li><span class="createlink">? subA</span>
28 <ul>
29 <li>filea
30 </li>
31 </ul>
32 <ul>
33 <li>fileb
34 </li>
35 </ul>
36 <ul>
37 <li>filec
38 </li>
39 <li>filed
40 </li>
41 </ul>
42 </li>
43 </ul>
44 </li>
45 <li><span class="createlink">? dirB</span>
46 <ul>
47 <li><span class="createlink">? subA</span>
48 <ul>
49 <li>filea
50 </li>
51 </ul>
52 </li>
53 </ul>
54 <ul>
55 <li><span class="createlink">? subC</span>
56 <ul>
57 <li>fileb
58 </li>
59 </ul>
60 <ul>
61 <li>filec
62 </li>
63 </ul>
64 </li>
65 </ul>
66 </li>
67 </ul>
68
69 Note that while the dirA/subA directory exists with a create link, the dirA/subB directory is missing from the map.  Interstingly, dirB/subC is shown in the map.  If you add a second file to dirB/subA then dirB/subC disappears as well.
70
71 I could imagine including all 'bare' directories in the map, and I could imagine including no 'bare' directories in the map.  Just including the first bare directory seems a strange intermediate point.