]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/forum/How_to_use_multiple_template_files_directories__63__/comment_1_cc2ffde6879a2a61353d0b116f6b4954._comment
Added a comment: Use an underlay instead
[git.ikiwiki.info.git] / doc / forum / How_to_use_multiple_template_files_directories__63__ / comment_1_cc2ffde6879a2a61353d0b116f6b4954._comment
1 [[!comment format=mdwn
2  username="smcv"
3  avatar="http://cdn.libravatar.org/avatar/0ee943fe632ff995f6f0f25b7167d03b"
4  subject="Use an underlay instead"
5  date="2017-05-14T11:37:13Z"
6  content="""
7 The exact setup you asked for is not currently possible because `templatedir`
8 only takes one value, but you can get the same practical result with an underlay:
10 * Create `/Users/XXX/config/ikiwiki/common-files/` or something (the exact name
11   is not significant, use whatever you want)
12 * Put your templates in `/Users/XXX/config/ikiwiki/common-files/templates/*.tmpl`
13   (it has to be a `templates/` subdirectory)
14 * Add the [[plugins/underlay]] plugin to the `add_plugins` config option
15 * Add `/Users/XXX/config/ikiwiki/common-files` to the `add_underlays` config
16   option (same syntax as `add_plugins`)
18 This is priority 2 from your list: it's \"less important\" than the `templates/`
19 subdirectory of the `srcdir`, but \"more important\" than the templates shipped
20 with ikiwiki.
22 If you create non-template pages or attachments in that underlay, they will
23 also be considered \"less important\" than pages or attachments of the same
24 name in the `srcdir`, but \"more important\" than ikiwiki's `basewiki` underlay.
25 I use an underlay like this to make
26 [smcv.pseudorandom.co.uk](https://smcv.pseudorandom.co.uk/)
27 and [www.pseudorandom.co.uk](https://www.pseudorandom.co.uk/)
28 share a stylesheet.
29 """]]