1 If `page.tmpl` is changed, it would be nice if ikiwiki automatically
2 noticed, and rebuilt all pages. If `inlinepage.tmpl` is changed, a rebuild
3 of all pages using it in an inline would be stellar.
5 This would allow setting:
7 templatedir => "$srcdir/templates",
9 .. and then the [[wikitemplates]] are managed like other wiki files; and
10 like other wiki files, a change to them automatically updates dependent
13 Originally, it made good sense not to have the templatedir inside the wiki.
14 Those templates can be used to bypass the htmlscrubber, and you don't want
15 just anyone to edit them. But the same can be said of `style.css` and
16 `ikiwiki.js`, which *are* in the wiki. We rely on `allowed_attachments`
17 being set to secure those to prevent users uploading replacements. And we
18 assume that users who can directly (non-anon) commit *can* edit them, and
21 So, perhaps the easiest way to solve this [[wishlist]] would be to
22 make templatedir *default* to "$srcdir/templates/, and make ikiwiki
23 register dependencies on `page.tmpl`, `inlinepage.tmpl`, etc, as they're
24 used. Although, having every page declare an explicit dep on `page.tmpl`
25 is perhaps a bit much; might be better to implement a special case for that
26 one. Also, having the templates be copied to `destdir` is not desirable.
28 The risk is that a site might have `allowed_attachments` set to "templates/*"
29 or "*.tmpl" something like that. I think such a configuration is the *only*
30 risk, and it's unlikely enough that a NEWS warning should suffice.
32 (This would also help to clear up the tricky disctinction between
33 wikitemplates and in-wiki templates.)
35 > But would this require that templates be parseable as wiki pages? Because that would be a nuisance. --[[KathrynAndersen]]