X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a..d5c5fef363564261ccba236f1d64eaa60567d514:/IkiWiki/Plugin/underlay.pm diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 380d418fb..116fe7324 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -21,19 +21,30 @@ sub getsetup () { }, add_underlays => { type => "string", - default => [], + example => ["$ENV{HOME}/wiki.underlay"], 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 () { - 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}}; } }