From 2a99ebf2766a08f8d68a82255d1518ecac73ec84 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 17:27:37 -0400 Subject: underlay: Also allow configuring additional directories to search for template files in. --- IkiWiki/Plugin/underlay.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 380d418fb..c59935672 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -27,14 +27,21 @@ sub getsetup () { safe => 0, rebuild => 1, }, + add_templates => { + type => "string", + default => [], + 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); } + push @{$config{templatedirs}}, @{$config{add_templates}}; } 1; -- cgit v1.2.3