]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' into cvs
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 10 Sep 2009 17:44:27 +0000 (13:44 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 10 Sep 2009 17:44:27 +0000 (13:44 -0400)
1  2 
IkiWiki.pm

diff --combined IkiWiki.pm
index 453bc9f8ca0898b97c2242d36367ec2ecb077b13,187d40a3aa7107df352080a7c9811d574628d852..85d8eea68419cb350e530c322958796186e05b1f
@@@ -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,
        },
        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 +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;