]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' of git://github.com/joeyh/ikiwiki
authorAmitai Schlair <schmonz@magnetic-babysitter.(none)>
Wed, 9 Sep 2009 18:44:52 +0000 (14:44 -0400)
committerAmitai Schlair <schmonz@magnetic-babysitter.(none)>
Wed, 9 Sep 2009 18:44:52 +0000 (14:44 -0400)
1  2 
IkiWiki.pm

diff --combined IkiWiki.pm
index 453bc9f8ca0898b97c2242d36367ec2ecb077b13,2f11069c691acb8d1bc3e43d1bfec915aa618898..48780ae51d137fd20aba4f369817c93762035bb6
@@@ -33,6 -33,7 +33,7 @@@ use Memoize
  memoize("abs2rel");
  memoize("pagespec_translate");
  memoize("file_pruned");
+ memoize("template_file");
  
  sub getsetup () {
        wikiname => {
                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",
                        qr/\.x?html?$/, qr/\.ikiwiki-new$/,
                        qr/(^|\/).svn\//, qr/.arch-ids\//, qr/{arch}\//,
                        qr/(^|\/)_MTN\//, qr/(^|\/)_darcs\//,
 -                      qr/\.dpkg-tmp$/],
 +                      qr/(^|\/)CVS\//, qr/\.dpkg-tmp$/],
                description => "regexps of source files to ignore",
                safe => 0,
                rebuild => 1,
@@@ -1609,7 -1617,8 +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;