formatting
[ikiwiki.git] / doc / plugins / contrib / trail / discussion.mdwn
1 I believe the `trail3-integrated` and `trail3-prebuild` branches address
2 Joey's review comments from IRC:
3
4     06-12-2011 19:01:07 <joeyh>: ok, light review finished. so, if you want
5     to make a branch with inline trail=yes, and perhaps also adding a hook
6     so you don't need to inject, I think I can merge it right away
7
8 I haven't published instructions for using this version as a
9 standalone plugin, because it needs core and inline changes.
10
11 Commits up to 63bb8b42 make the trail plugin better-integrated,
12 including `\[[!inline trail=yes]]`. 63bb8b42 is the commit to
13 merge if you don't like the design of my hooks.
14
15 Commit 24168b99 adds a `build_affected` hook, run at about the
16 same time as `render_backlinks`, and uses it to render the
17 extra pages. This removes the need for `trail` to inject
18 anything. In principle, backlinks etc. could use this hook
19 too, if they weren't core.
20
21 Commit d0dea308 on the `trail3-prebuild` branch adds a
22 `prebuild` hook, which runs after everything has been scanned
23 but before anything is rendered. This removes the need
24 for `trail` to run its old `prerender` function in its
25 render hooks (preprocess, pagetemplate etc.) to collate
26 metadata before it renders anything. However, I'm not sure
27 that this is really the right thing to do, which is why it's
28 in its own branch: the `prebuild` hook is a lot like
29 `needsbuild` (but later), so it's called even if no trail
30 or trail member has actually been edited.
31
32 For it to be useful for `trail`, the `prebuild` hook has to run
33 after both pagespecs and sorting work. The other use case
34 I've seen for a similar hook was for Guiseppe Bilotta to
35 sort an inline-of-inlines by mtime of newest post, but that
36 can't be the same hook, because it has to run after pagespecs
37 work, but before sorting.
38
39 --[[smcv]]