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");
}
} #}}}
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}};
+ikiwiki (1.8) unstable; urgency=low
+
+ If your wiki is configured with a setup file, you should modify it to
+ stop setting the "plugin" list directly, and instead add or remove plugins
+ via the add_plugins and disable_plugins lines. For example, if you had:
+
+ plugin => [qw{inline smiley search}],
+
+ Change it to these lines, which disables the default htmlscrubber plugin
+ and adds the two additional plugins:
+
+ add_plugins => [qw{smiley search}],
+ disable_plugins => [qw{htmlscrubber}],
+
+ Making this change makes your ikiwiki setup file more future-proof since
+ new default plugins will be automatically used.
+
+ -- Joey Hess <joeyh@debian.org> Mon, 3 Jul 2006 16:59:29 -0400
+
ikiwiki (1.1) unstable; urgency=low
There have been several configuration changes in this release of ikiwiki:
* Centralised all calls to HTML::Template and force all the templates
to be read as utf8.
* Support pages with utf8 filenames. Patch by Faidon Liambotis.
+ * 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.
- -- Joey Hess <joeyh@debian.org> Mon, 3 Jul 2006 16:17:20 -0400
+ -- Joey Hess <joeyh@debian.org> Mon, 3 Jul 2006 16:57:37 -0400
ikiwiki (1.7) unstable; urgency=low
#!/usr/bin/perl
# Configuration file for ikiwiki.
-# Passing this to ikiwiki --setup will make ikiwiki generate two
-# wrapper programs, one for cgi and one for a subversion post-commit hook.
+# Passing this to ikiwiki --setup will make ikiwiki generate wrappers and
+# build the wiki.
#
# Remember to re-run ikiwiki --setup any time you edit this file.
discussion => 1,
# Time format (for strftime)
#timeformat => '%c',
- # To change the enabled plugins, edit this list
- #plugin => [qw{pagecount inline brokenlinks search smiley
- # htmlscrubber}],
+
+ # To add plugins, list them here.
+ #add_plugins => [qw{pagecount brokenlinks search smiley}],
+ # If you want to disable any of the default plugins, list them here.
+ #disable_plugins => [qw{inline htmlscrubber}],
}
The [[inline]] and [[htmlscrubber]] plugins are enabled by default.
To enable other plugins, use the `--plugin` switch described in [[usage]],
-or the equivalent line in [[ikiwiki.setup]].
+or the equivalent `add_plugins` line in [[ikiwiki.setup]].
# Plugin directory
push @{$config{plugin}}, $_[1];
},
"disable-plugin=s@" => sub {
- $config{plugin}=[grep { $_ ne $_[1] } @{$config{plugin}} ];
+ $config{plugin}=[grep { $_ ne $_[1] } @{$config{plugin}}];
},
"pingurl" => sub {
push @{$config{pingurl}}, $_[1];