]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/aggregate_to_internal_pages.mdwn
fix link to Jason Blevins user page
[ikiwiki.git] / doc / todo / aggregate_to_internal_pages.mdwn
1 The new internal page feature is designed for something like
2 [[plugins/aggregate]].
3
4 How to transition to it though? inlines of aggregated content would need to
5 change their pagespecs to use `internal()`.
6
7 > [[patch]] in git://git.debian.org/git/users/smcv/ikiwiki.git, branch "aggregate".
8 > Migration is a two-step process: first change all your pagespecs to use `internal()`, then add `internalize="yes"` to all your aggregate invocations. --smcv.pseudorandom.co.uk
9
10 > Thanks for working on this.
11
12 > I see one problem, if internalize is flipped on and there are existing
13 > aggregated pages, htmlfn will not return the right filename for those
14 > pages when expiring them. Seems that `$was_internal` (or just the full
15 > source filename) should be recorded on a per-guid basis. Could you do
16 > that?
17
18 > I'm weighing the added complexity of having an internalize option
19 > (which people would have to add, and would probably forget), with just
20 > making aggregate create all new pages as internal, and having a flag day
21 > where all inlines and other uses of aggregated pages have to change
22 > pagespecs to use `isinternal()`.
23
24 > There are real bugs that are fixed by making
25 > aggregated plugins internal, including:
26 > - Avoids web edits to aggregated pages. (Arguably a security hole;
27 >   though they can be locked..)
28 > - Significant speed improvements.
29 > - Less disk use.
30
31 > If internal has to be manually enabled, people will forget to. I'd rather
32 > not have to worry about these bugs in the future. So, I'm thinking flag
33 > day. --[[Joey]]
34
35 > OK, there's a simpler approach in the same repository, branch
36 > "aggregateinternal". It just adds an aggregateinternal option
37 > for the whole wiki.
38 >
39 > On a flag day, everyone has to change their inline directives
40 > to use `internal()`, after which this option can be switched on.
41 > When changing the option, you'll have to clean up the mess from
42 > old aggregated pages by hand, and re-aggregate.
43 >
44 > If this is a direction you prefer, the next step would be to
45 > add support for existing wikis setting this option - for instance
46 > it could look for non-internal pages that were previously
47 > aggregated, and convert them to internal, the first time aggregation
48 > runs. --smcv
49
50 > Sure, that seems reasonable. Perhaps `ikiwiki-transition` could be used
51 > to move the pages, and even, possibly update the pagespecs (not sure how
52 > it could figure out which ones tho). --[[Joey]]
53
54 > I've patched ikiwiki-transition to have an aggregateinternal mode.
55 > See my aggregateinternal branch, again.
56 > "ikiwiki-transition aggregateinternal $setupfile" moves the pages around,
57 > although it doesn't update the pagespecs (I wouldn't know how...) --[[smcv]]
58
59 [[!tag patch done]]