diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-03 21:29:56 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-03 21:29:56 +0000 |
commit | 7ea8df24b32a36687cfea94e2b84272777562325 (patch) | |
tree | c30bb00a324877fe4c2764d69f5e4af51385e17f /IkiWiki | |
parent | 929b9de9c2b0f3ed1a0c9e006d084519bd5e0479 (diff) |
* Introduce add_plugins and disable_plugins config options in setup files.
This allows adding or removing plugins w/o overriding the whole list of
default plugins, which makes it easier to upgrade when new default plugins
are added.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Render.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Setup/Standard.pm | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 960d1da1e..ac8f03937 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -226,10 +226,7 @@ sub check_overwrite ($$) { #{{{ my $src=shift; if (! exists $renderedfiles{$src} && -e $dest && ! $config{rebuild}) { - error("$dest already exists and was rendered from ". - join(" ",(grep { $renderedfiles{$_} eq $dest } keys - %renderedfiles)). - ", before, so not rendering from $src"); + error("$dest already exists and was not rendered from $src before"); } } #}}} diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 786ba70ac..d42ceffa0 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -19,6 +19,18 @@ package IkiWiki; sub setup_standard { my %setup=%{$_[1]}; + $setup{plugin}=$config{plugin}; + if (exists $setup{add_plugins}) { + push @{$setup{plugin}}, @{$setup{add_plugins}}; + delete $setup{add_plugins}; + } + if (exists $setup{disable_plugins}) { + foreach my $plugin (@{$setup{disable_plugins}}) { + $setup{plugin}=[grep { $_ ne $plugin } @{$setup{plugin}}]; + } + delete $setup{disable_plugins}; + } + if (! $config{refresh}) { debug("generating wrappers.."); my @wrappers=@{$setup{wrappers}}; |