aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-09-08 17:27:37 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-09-08 17:27:37 -0400
commit2a99ebf2766a08f8d68a82255d1518ecac73ec84 (patch)
treeb92d617498472a2dd497b172f855c4c54651c4b2 /IkiWiki.pm
parent93ab004cc23e183199d760f9ecd5afee260c47e9 (diff)
downloadikiwiki-2a99ebf2766a08f8d68a82255d1518ecac73ec84.tar
ikiwiki-2a99ebf2766a08f8d68a82255d1518ecac73ec84.tar.gz
underlay: Also allow configuring additional directories to search for template files in.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 01898936f..2f11069c6 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -150,6 +150,13 @@ sub getsetup () {
safe => 0, # path
rebuild => 1,
},
+ templatedirs => {
+ type => "internal",
+ default => [],
+ description => "additional directories containing template files",
+ safe => 0,
+ rebuild => 0,
+ },
underlaydir => {
type => "string",
default => "$installdir/share/ikiwiki/basewiki",
@@ -1610,7 +1617,8 @@ sub saveindex () {
sub template_file ($) {
my $template=shift;
- foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") {
+ foreach my $dir ($config{templatedir}, @{$config{templatedirs}},
+ "$installdir/share/ikiwiki/templates") {
return "$dir/$template" if -e "$dir/$template";
}
return;