summaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 453bc9f8c..85d8eea68 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -33,6 +33,7 @@ use Memoize;
memoize("abs2rel");
memoize("pagespec_translate");
memoize("file_pruned");
+memoize("template_file");
sub getsetup () {
wikiname => {
@@ -149,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",
@@ -356,7 +364,7 @@ sub getsetup () {
},
web_commit_regexp => {
type => "internal",
- default => qr/^web commit (by (.*?(?=: |$))|from (\d+\.\d+\.\d+\.\d+)):?(.*)/,
+ default => qr/^web commit (by (.*?(?=: |$))|from ([0-9a-fA-F:.]+[0-9a-fA-F])):?(.*)/,
description => "regexp to parse web commits from logs",
safe => 0,
rebuild => 0,
@@ -1609,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;