]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/underlay.pm
po: inject custom isselflink to fix selflink detection on translation pages
[git.ikiwiki.info.git] / IkiWiki / Plugin / underlay.pm
index c599356728e39dddcf729f62cbe5e78ada939f50..116fe7324e5d3b4a770acd6876067eb020cf4ae8 100644 (file)
@@ -21,7 +21,7 @@ sub getsetup () {
                },
                add_underlays => {
                        type => "string",
-                       default => [],
+                       example => ["$ENV{HOME}/wiki.underlay"],
                        description => "extra underlay directories to add",
                        advanced => 1,
                        safe => 0,
@@ -29,7 +29,7 @@ sub getsetup () {
                },
                add_templates => {
                        type => "string",
-                       default => [],
+                       example => ["$ENV{HOME}/.ikiwiki/templates"],
                        description => "extra template directories to add",
                        advanced => 1,
                        safe => 0,
@@ -38,10 +38,14 @@ sub getsetup () {
 }
 
 sub checkconfig () {
-       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}};
        }
-       push @{$config{templatedirs}}, @{$config{add_templates}};
 }
 
 1;