* 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.master
parent
929b9de9c2
commit
7ea8df24b3
|
@ -226,10 +226,7 @@ sub check_overwrite ($$) { #{{{
|
||||||
my $src=shift;
|
my $src=shift;
|
||||||
|
|
||||||
if (! exists $renderedfiles{$src} && -e $dest && ! $config{rebuild}) {
|
if (! exists $renderedfiles{$src} && -e $dest && ! $config{rebuild}) {
|
||||||
error("$dest already exists and was rendered from ".
|
error("$dest already exists and was not rendered from $src before");
|
||||||
join(" ",(grep { $renderedfiles{$_} eq $dest } keys
|
|
||||||
%renderedfiles)).
|
|
||||||
", before, so not rendering from $src");
|
|
||||||
}
|
}
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,18 @@ package IkiWiki;
|
||||||
sub setup_standard {
|
sub setup_standard {
|
||||||
my %setup=%{$_[1]};
|
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}) {
|
if (! $config{refresh}) {
|
||||||
debug("generating wrappers..");
|
debug("generating wrappers..");
|
||||||
my @wrappers=@{$setup{wrappers}};
|
my @wrappers=@{$setup{wrappers}};
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
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
|
ikiwiki (1.1) unstable; urgency=low
|
||||||
|
|
||||||
There have been several configuration changes in this release of ikiwiki:
|
There have been several configuration changes in this release of ikiwiki:
|
||||||
|
|
|
@ -23,8 +23,12 @@ ikiwiki (1.8) UNRELEASED; urgency=low
|
||||||
* Centralised all calls to HTML::Template and force all the templates
|
* Centralised all calls to HTML::Template and force all the templates
|
||||||
to be read as utf8.
|
to be read as utf8.
|
||||||
* Support pages with utf8 filenames. Patch by Faidon Liambotis.
|
* 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
|
ikiwiki (1.7) unstable; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# Configuration file for ikiwiki.
|
# Configuration file for ikiwiki.
|
||||||
# Passing this to ikiwiki --setup will make ikiwiki generate two
|
# Passing this to ikiwiki --setup will make ikiwiki generate wrappers and
|
||||||
# wrapper programs, one for cgi and one for a subversion post-commit hook.
|
# build the wiki.
|
||||||
#
|
#
|
||||||
# Remember to re-run ikiwiki --setup any time you edit this file.
|
# Remember to re-run ikiwiki --setup any time you edit this file.
|
||||||
|
|
||||||
|
@ -69,7 +69,9 @@ use IkiWiki::Setup::Standard {
|
||||||
discussion => 1,
|
discussion => 1,
|
||||||
# Time format (for strftime)
|
# Time format (for strftime)
|
||||||
#timeformat => '%c',
|
#timeformat => '%c',
|
||||||
# To change the enabled plugins, edit this list
|
|
||||||
#plugin => [qw{pagecount inline brokenlinks search smiley
|
# To add plugins, list them here.
|
||||||
# htmlscrubber}],
|
#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}],
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ install and use plugins contributed by others.
|
||||||
The [[inline]] and [[htmlscrubber]] plugins are enabled by default.
|
The [[inline]] and [[htmlscrubber]] plugins are enabled by default.
|
||||||
|
|
||||||
To enable other plugins, use the `--plugin` switch described in [[usage]],
|
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
|
# Plugin directory
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue