1 It would be nice to be able to override a single template without keeping a
2 private copy of the entire template directory.
6 templatedirs => [ "my/dir", "/usr/share/ikiwiki/templates" ]
10 > Now that I look at the source, I see that ikiwiki already falls back to the
11 > global dir when it cannot find a template. For me, this is good enough.
12 > And it is even documented in the man page. Sigh. I guess this could be
13 > considered [[done]].
15 I have a use case for this, a site composed of blogs and wikis, templates divided in three categories : common, blog and wiki. The only solution I found is maintaining hard links, being able to have multiple template dirs would obviously be better. -- Changaco
17 > [[plugins/underlay]] used to allow adding extra templatedirs, but Joey
18 > removed that functionality when he made templates search the wiki's
19 > own `templates` directory.
21 > You can get a 3-level hierarchy like this:
23 > * instance-specific overrides: $srcdir/templates
24 > * common to the entire site: a directory that is the value of all
25 > instances' `templatedir` parameters
26 > * common to every ikiwiki in the world: /usr/share/ikiwiki/templates
27 > (implicitly searched)
29 > (by "instance" I mean an instance of ikiwiki - a .setup file, basically.)
31 > For a more complex hierarchy you'd need the old [[plugins/underlay]]
32 > functionality, i.e. you'd need to (ask Joey to) revert the patch that
33 > removed it. For instance, if anyone has a hierarchy like this, then
34 > they need the old functionality back in order to split the template
35 > search path for the things marked `(???)`:
37 > every ikiwiki in the world (/usr/share/ikiwiki/templates)
38 > \--- your site (???)
39 > \--- your blogs (???)
40 > \--- travel blog ($srcdir/templates)
41 > \--- code blog ($srcdir/templates)
42 > \--- your wikis (???)
43 > \--- travel wiki ($srcdir/templates)
44 > \--- code wiki ($srcdir/templates)
46 > This looks pretty hypothetical to me, though...
49 >> The reason I removed it is because the same functionality of having
50 >> multiple template directories is still present. Just put them in
51 >> the templates/ subdirectory of multiple underlay directories instead.
54 >>>Thanks, I didn't realize this was possible. Problem solved. -- Changaco
56 >>>> We can consider this [[done]], then. For reference, the solution
57 >>>> to the hierarchy I mentioned above would be:
59 >>>> all your sites have $your_underlay as an underlay
61 >>>> the blogs and wikis all have $blog_underlay or $wiki_underlay
62 >>>> (as appropriate) as a higher priority underlay
64 >>>> every ikiwiki in the world (/usr/share/ikiwiki/templates)
65 >>>> \--- your site ($your_underlay/templates, or templatedir)
66 >>>> \--- your blogs ($blog_underlay/templates)
67 >>>> \--- travel blog ($srcdir/templates)
68 >>>> \--- code blog ($srcdir/templates)
69 >>>> \--- your wikis ($wiki_underlay/templates)
70 >>>> \--- travel wiki ($srcdir/templates)
71 >>>> \--- code wiki ($srcdir/templates)