add spec dependency
[ikiwiki] / doc / bugs / toc_in_sidebar.mdwn
1 Putting a toc in the sidebar used to work, but was broken by
2 commit 9652cdfe2eb16150518e34af33c8858118fe0a09, which, in turn fixed a bug
3 with the toc not appearing during page preview.
4
5 So, if toc is a sanitize hook, it can't be used in the sidebar, because the
6 sidebar is only added to the page later. If the toc is a format hook, it
7 shows up in the sidebar, but not at page preview time (because format hooks
8 are not called during preview). Also, calling the toc as a format hook
9 makes any headers that are hardcoded into the page template show up in the
10 toc, which is rarely desirable.
11
12 I can't think of a way between these that works in all cases. Maybe call
13 the format hooks when generating a page preview? Maybe add an option to toc
14 to make it embeddable in the sidebar? 
15
16 Hmm, I think I need to call format during preview. Another case is that
17 inline uses a format hook to insert the inlined content..
18
19 --[[Joey]]
20
21 [[done]]