From 23d62f42bd8fe18087cd293962a79d937cf5a3bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 14:35:00 -0400 Subject: [PATCH] remove add_templates option Templates are moving into the srcdir, and will also be searched for in configured underlays, so this is redundant. --- IkiWiki.pm | 9 +-------- IkiWiki/Plugin/underlay.pm | 11 ----------- doc/plugins/underlay.mdwn | 6 ------ 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index ec8b32a63..c2c2337b4 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -157,13 +157,6 @@ sub getsetup () { safe => 0, # path rebuild => 1, }, - templatedirs => { - type => "internal", - default => [], - description => "additional directories containing template files", - safe => 0, - rebuild => 0, - }, underlaydir => { type => "string", default => "$installdir/share/ikiwiki/basewiki", @@ -1661,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $template=shift; - foreach my $dir ($config{templatedir}, @{$config{templatedirs}}, + foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { return "$dir/$template" if -e "$dir/$template"; } diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 116fe7324..3ea19c635 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -27,14 +27,6 @@ sub getsetup () { 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 () { @@ -43,9 +35,6 @@ sub checkconfig () { add_underlay($dir); } } - if ($config{add_templates}) { - push @{$config{templatedirs}}, @{$config{add_templates}}; - } } 1; diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn index 8836a394c..0cf819472 100644 --- a/doc/plugins/underlay.mdwn +++ b/doc/plugins/underlay.mdwn @@ -12,9 +12,3 @@ revision control, like photos or software releases. Directories in `add_underlays` should usually be absolute. If relative, they're interpreted as relative to the parent directory of the basewiki underlay, which is probably not particularly useful in this context. - --- - -This plugin also adds an `add_templates` option to the setup file. -Its value is a list of template directories to look for template files in, -if they are not present in the `templatedir`. -- 2.39.5