]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/autoindex_should_use_add__95__autofile.mdwn
very slow progress
[ikiwiki.git] / doc / todo / autoindex_should_use_add__95__autofile.mdwn
1 `add_autofile` is a generic version of [[plugins/autoindex]]'s code,
2 so the latter should probably use the former. --[[smcv]]
3
4 ----
5
6 [[!template id=gitbranch branch=smcv/autoindex-autofile author="[[smcv]]"]]
7
8 I'm having trouble fixing this:
9
10         # FIXME: some of this is probably redundant with add_autofile now, and
11         # the rest should perhaps be added to the autofile machinery
12
13 By "a generic version of" above, it seems I mean "almost, but not
14 quite, entirely unlike". I tried digging through the git history for the
15 reasoning behind the autofile and autoindex implementations, but now I'm
16 mostly confused.
17
18 The autofile machinery records a list of every file that has ever been proposed
19 as an autofile: for instance, the tag plugin has a list of every tag that
20 has ever been named in a \[[!tag]] or \[[!taglink]], even if no file was
21 actually needed (e.g. because it already existed). Checks for files that
22 already exist (or whatever) are deferred until after this list has been
23 updated, and files in this list are never auto-created again unless the wiki
24 is rebuilt.
25
26 The autoindex machinery records a more complex set. Items are added to the
27 set when they are deleted, but would otherwise have been added as an autoindex
28 (don't exist, do have children (by which I mean subpages or attachments),
29 and are a directory in the srcdir). They're removed if this particular run
30 wouldn't have added them as an autoindex (they exist, or don't have children).
31
32 Still researching why there's this difference, and whether one or the other
33 would be better for all cases...