]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/underlay.pm
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[git.ikiwiki.info.git] / IkiWiki / Plugin / underlay.pm
index 380d418fba9919b3023e391bed3237406424f76a..116fe7324e5d3b4a770acd6876067eb020cf4ae8 100644 (file)
@@ -21,19 +21,30 @@ sub getsetup () {
                },
                add_underlays => {
                        type => "string",
                },
                add_underlays => {
                        type => "string",
-                       default => [],
+                       example => ["$ENV{HOME}/wiki.underlay"],
                        description => "extra underlay directories to add",
                        advanced => 1,
                        safe => 0,
                        rebuild => 1,
                },
                        description => "extra underlay directories to add",
                        advanced => 1,
                        safe => 0,
                        rebuild => 1,
                },
+               add_templates => {
+                       type => "string",
+                       example => ["$ENV{HOME}/.ikiwiki/templates"],
+                       description => "extra template directories to add",
+                       advanced => 1,
+                       safe => 0,
+                       rebuild => 1,
+               },
 }
 
 sub checkconfig () {
 }
 
 sub checkconfig () {
-       return unless exists $config{add_underlays};
-
-       foreach my $dir (@{$config{add_underlays}}) {
-               add_underlay($dir);
+       if ($config{add_underlays}) {
+               foreach my $dir (@{$config{add_underlays}}) {
+                       add_underlay($dir);
+               }
+       }
+       if ($config{add_templates}) {
+               push @{$config{templatedirs}}, @{$config{add_templates}};
        }
 }
 
        }
 }