},
add_underlays => {
type => "string",
- default => [],
+ example => ["$ENV{HOME}/wiki.underlay"],
description => "extra underlay directories to add",
advanced => 1,
safe => 0,
},
add_templates => {
type => "string",
- default => [],
+ example => ["$ENV{HOME}/.ikiwiki/templates"],
description => "extra template directories to add",
advanced => 1,
safe => 0,
}
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;