summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/aggregate.pm4
-rw-r--r--IkiWiki/Plugin/amazon_s3.pm6
-rw-r--r--IkiWiki/Plugin/anonok.pm4
-rw-r--r--IkiWiki/Plugin/attachment.pm6
-rw-r--r--IkiWiki/Plugin/autoindex.pm9
-rw-r--r--IkiWiki/Plugin/brokenlinks.pm9
-rw-r--r--IkiWiki/Plugin/bzr.pm4
-rw-r--r--IkiWiki/Plugin/calendar.pm4
-rw-r--r--IkiWiki/Plugin/camelcase.pm9
-rw-r--r--IkiWiki/Plugin/conditional.pm9
-rw-r--r--IkiWiki/Plugin/creole.pm9
-rw-r--r--IkiWiki/Plugin/cutpaste.pm9
-rw-r--r--IkiWiki/Plugin/ddate.pm9
-rw-r--r--IkiWiki/Plugin/editdiff.pm9
-rw-r--r--IkiWiki/Plugin/edittemplate.pm10
-rw-r--r--IkiWiki/Plugin/embed.pm9
-rw-r--r--IkiWiki/Plugin/external.pm2
-rw-r--r--IkiWiki/Plugin/favicon.pm9
-rw-r--r--IkiWiki/Plugin/fortune.pm9
-rw-r--r--IkiWiki/Plugin/git.pm4
-rw-r--r--IkiWiki/Plugin/goodstuff.pm9
-rw-r--r--IkiWiki/Plugin/googlecalendar.pm10
-rw-r--r--IkiWiki/Plugin/graphviz.pm9
-rw-r--r--IkiWiki/Plugin/haiku.pm9
-rw-r--r--IkiWiki/Plugin/hnb.pm17
-rw-r--r--IkiWiki/Plugin/html.pm9
-rw-r--r--IkiWiki/Plugin/htmlscrubber.pm9
-rw-r--r--IkiWiki/Plugin/htmltidy.pm9
-rw-r--r--IkiWiki/Plugin/httpauth.pm9
-rw-r--r--IkiWiki/Plugin/img.pm9
-rw-r--r--IkiWiki/Plugin/inline.pm4
-rw-r--r--IkiWiki/Plugin/link.pm9
-rw-r--r--IkiWiki/Plugin/linkmap.pm9
-rw-r--r--IkiWiki/Plugin/lockedit.pm4
-rw-r--r--IkiWiki/Plugin/map.pm9
-rw-r--r--IkiWiki/Plugin/mdwn.pm4
-rw-r--r--IkiWiki/Plugin/mercurial.pm4
-rw-r--r--IkiWiki/Plugin/meta.pm9
-rw-r--r--IkiWiki/Plugin/mirrorlist.pm4
-rw-r--r--IkiWiki/Plugin/monotone.pm4
-rw-r--r--IkiWiki/Plugin/more.pm11
-rw-r--r--IkiWiki/Plugin/norcs.pm10
-rw-r--r--IkiWiki/Plugin/websetup.pm3
43 files changed, 316 insertions, 10 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index 673668c0e..85b398063 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -40,6 +40,10 @@ sub getopt () { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
aggregateinternal => {
type => "boolean",
example => 0,
diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm
index e181a84da..597539c13 100644
--- a/IkiWiki/Plugin/amazon_s3.pm
+++ b/IkiWiki/Plugin/amazon_s3.pm
@@ -42,7 +42,11 @@ sub getopt () { #{{{
sub getsetup () { #{{{
return
- amazon_s3_key_id => {
+ plugin => {
+ safe => 0,
+ rebuild => 0,
+ },
+ amazon_s3_key_id => {
type => "string",
example => "XXXXXXXXXXXXXXXXXXXX",
description => "public access key id",
diff --git a/IkiWiki/Plugin/anonok.pm b/IkiWiki/Plugin/anonok.pm
index ccc0d59b9..521b07f40 100644
--- a/IkiWiki/Plugin/anonok.pm
+++ b/IkiWiki/Plugin/anonok.pm
@@ -12,6 +12,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0,
+ rebuild => 0,
+ },
anonok_pagespec => {
type => "pagespec",
example => "*/discussion",
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index 63f0b73c3..404ca07fa 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -14,6 +14,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
virus_checker => {
type => "string",
example => "clamdscan -",
@@ -23,7 +27,7 @@ sub getsetup () { #{{{
},
allowed_attachments => {
type => "pagespec",
- example => "mimetype(image/*) and maxsize(50kb)",
+ example => "virusfree() and mimetype(image/*) and maxsize(50kb)",
description => "enhanced PageSpec specifying what attachments are allowed",
link => "ikiwiki/PageSpec/attachment",
safe => 1,
diff --git a/IkiWiki/Plugin/autoindex.pm b/IkiWiki/Plugin/autoindex.pm
index 8179ee1e7..ef22ec8a3 100644
--- a/IkiWiki/Plugin/autoindex.pm
+++ b/IkiWiki/Plugin/autoindex.pm
@@ -7,9 +7,18 @@ use IkiWiki 2.00;
use Encode;
sub import { #{{{
+ hook(type => "getsetup", id => "autoindex", call => \&getsetup);
hook(type => "refresh", id => "autoindex", call => \&refresh);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
+
sub genindex ($) { #{{{
my $page=shift;
my $file=$page.".".$config{default_pageext};
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index 0295a8fe6..37752dd3e 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
@@ -7,9 +7,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "brokenlinks", call => \&getsetup);
hook(type => "preprocess", id => "brokenlinks", call => \&preprocess);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
$params{pages}="*" unless defined $params{pages};
diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm
index 0b5059292..101e91b93 100644
--- a/IkiWiki/Plugin/bzr.pm
+++ b/IkiWiki/Plugin/bzr.pm
@@ -33,6 +33,10 @@ sub checkconfig () { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
bzr_wrapper => {
type => "string",
#example => "", # FIXME add example
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
index 6f1f9bd07..6d536a91b 100644
--- a/IkiWiki/Plugin/calendar.pm
+++ b/IkiWiki/Plugin/calendar.pm
@@ -37,6 +37,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
archivebase => {
type => "string",
example => "archives",
diff --git a/IkiWiki/Plugin/camelcase.pm b/IkiWiki/Plugin/camelcase.pm
index 0739bb01a..3f17df4a3 100644
--- a/IkiWiki/Plugin/camelcase.pm
+++ b/IkiWiki/Plugin/camelcase.pm
@@ -23,10 +23,19 @@ my $link_regexp=qr{
}x;
sub import { #{{{
+ hook(type => "getsetup", id => "camelcase", call => \&getsetup);
hook(type => "linkify", id => "camelcase", call => \&linkify);
hook(type => "scan", id => "camelcase", call => \&scan);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ };
+} #}}}
+
sub linkify (@) { #{{{
my %params=@_;
my $page=$params{page};
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm
index 6be52eaa6..7716fce1b 100644
--- a/IkiWiki/Plugin/conditional.pm
+++ b/IkiWiki/Plugin/conditional.pm
@@ -7,9 +7,18 @@ use IkiWiki 2.00;
use UNIVERSAL;
sub import { #{{{
+ hook(type => "getsetup", id => "conditional", call => \&getsetup);
hook(type => "preprocess", id => "if", call => \&preprocess_if);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess_if (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Plugin/creole.pm b/IkiWiki/Plugin/creole.pm
index 0c857d125..7c729300d 100644
--- a/IkiWiki/Plugin/creole.pm
+++ b/IkiWiki/Plugin/creole.pm
@@ -8,9 +8,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "creole", call => \&getsetup);
hook(type => "htmlize", id => "creole", call => \&htmlize);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
+} #}}}
+
sub htmlize (@) { #{{{
my %params=@_;
my $content = $params{content};
diff --git a/IkiWiki/Plugin/cutpaste.pm b/IkiWiki/Plugin/cutpaste.pm
index b1161ba06..24a05601d 100644
--- a/IkiWiki/Plugin/cutpaste.pm
+++ b/IkiWiki/Plugin/cutpaste.pm
@@ -9,11 +9,20 @@ use UNIVERSAL;
my %savedtext;
sub import { #{{{
+ hook(type => "getsetup", id => "cutpaste", call => \&getsetup);
hook(type => "preprocess", id => "cut", call => \&preprocess_cut, scan => 1);
hook(type => "preprocess", id => "copy", call => \&preprocess_copy, scan => 1);
hook(type => "preprocess", id => "paste", call => \&preprocess_paste);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess_cut (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Plugin/ddate.pm b/IkiWiki/Plugin/ddate.pm
index d081cb509..2ec122833 100644
--- a/IkiWiki/Plugin/ddate.pm
+++ b/IkiWiki/Plugin/ddate.pm
@@ -6,9 +6,18 @@ use IkiWiki 2.00;
no warnings;
sub import { #{{{
+ hook(type => "getsetup", id => "ddate", call => \&getsetup);
hook(type => "checkconfig", id => "ddate", call => \&checkconfig);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+} #}}}
+
sub checkconfig () { #{{{
if (! defined $config{timeformat} ||
$config{timeformat} eq '%c') {
diff --git a/IkiWiki/Plugin/editdiff.pm b/IkiWiki/Plugin/editdiff.pm
index 9872e9686..2b1fac55d 100644
--- a/IkiWiki/Plugin/editdiff.pm
+++ b/IkiWiki/Plugin/editdiff.pm
@@ -9,10 +9,19 @@ use HTML::Entities;
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "editdiff", call => \&getsetup);
hook(type => "formbuilder_setup", id => "editdiff",
call => \&formbuilder_setup);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
+
sub diff ($$) { #{{{
my $orig=shift;
my $content=shift;
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index d1716a315..cdcdd074f 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -8,6 +8,8 @@ use HTML::Template;
use Encode;
sub import { #{{{
+ hook(type => "getsetup", id => "edittemplate",
+ call => \&getsetup);
hook(type => "needsbuild", id => "edittemplate",
call => \&needsbuild);
hook(type => "preprocess", id => "edittemplate",
@@ -16,6 +18,14 @@ sub import { #{{{
call => \&formbuilder);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub needsbuild (@) { #{{{
my $needsbuild=shift;
diff --git a/IkiWiki/Plugin/embed.pm b/IkiWiki/Plugin/embed.pm
index 4fc91d978..2a1637392 100644
--- a/IkiWiki/Plugin/embed.pm
+++ b/IkiWiki/Plugin/embed.pm
@@ -44,9 +44,18 @@ my $safehtml=qr{(
my @embedded;
sub import { #{{{
+ hook(type => "getsetup", id => "embed", call => \&getsetup);
hook(type => "filter", id => "embed", call => \&filter);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub embed ($) { #{{{
hook(type => "format", id => "embed", call => \&format) unless @embedded;
push @embedded, shift;
diff --git a/IkiWiki/Plugin/external.pm b/IkiWiki/Plugin/external.pm
index 204442c1e..ff3b2d8ed 100644
--- a/IkiWiki/Plugin/external.pm
+++ b/IkiWiki/Plugin/external.pm
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# Support for external plugins written in other languages.
-# Communication via XML RPC a pipe.
+# Communication via XML RPC to a pipe.
# See externaldemo for an example of a plugin that uses this.
package IkiWiki::Plugin::external;
diff --git a/IkiWiki/Plugin/favicon.pm b/IkiWiki/Plugin/favicon.pm
index 7169c58c3..e9204dea9 100644
--- a/IkiWiki/Plugin/favicon.pm
+++ b/IkiWiki/Plugin/favicon.pm
@@ -8,9 +8,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "favicon", call => \&getsetup);
hook(type => "pagetemplate", id => "favicon", call => \&pagetemplate);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+} #}}}
+
sub pagetemplate (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Plugin/fortune.pm b/IkiWiki/Plugin/fortune.pm
index a78a73d5f..456b63e9f 100644
--- a/IkiWiki/Plugin/fortune.pm
+++ b/IkiWiki/Plugin/fortune.pm
@@ -7,9 +7,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "fortune", call => \&getsetup);
hook(type => "preprocess", id => "fortune", call => \&preprocess);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
$ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
my $f = `fortune 2>/dev/null`;
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index b6ad43167..36674572b 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -42,6 +42,10 @@ sub checkconfig () { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
git_wrapper => {
type => "string",
example => "/git/wiki.git/hooks/post-update",
diff --git a/IkiWiki/Plugin/goodstuff.pm b/IkiWiki/Plugin/goodstuff.pm
index effbc7de9..df928f222 100644
--- a/IkiWiki/Plugin/goodstuff.pm
+++ b/IkiWiki/Plugin/goodstuff.pm
@@ -24,7 +24,16 @@ my @bundle=qw{
};
sub import { #{{{
+ hook(type => "getsetup", id => "goodstuff", call => \&getsetup);
IkiWiki::loadplugin($_) foreach @bundle;
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
1
diff --git a/IkiWiki/Plugin/googlecalendar.pm b/IkiWiki/Plugin/googlecalendar.pm
index 7efa1daa3..81a3ad677 100644
--- a/IkiWiki/Plugin/googlecalendar.pm
+++ b/IkiWiki/Plugin/googlecalendar.pm
@@ -6,12 +6,22 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "googlecalendar",
+ call => \&getsetup);
hook(type => "preprocess", id => "googlecalendar",
call => \&preprocess);
hook(type => "format", id => "googlecalendar",
call => \&format);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm
index 021aa6b23..999edd8ee 100644
--- a/IkiWiki/Plugin/graphviz.pm
+++ b/IkiWiki/Plugin/graphviz.pm
@@ -9,9 +9,18 @@ use IkiWiki 2.00;
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "graphviz", call => \&getsetup);
hook(type => "preprocess", id => "graphviz", call => \&graph);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
my %graphviz_programs = (
"dot" => 1, "neato" => 1, "fdp" => 1, "twopi" => 1, "circo" => 1
);
diff --git a/IkiWiki/Plugin/haiku.pm b/IkiWiki/Plugin/haiku.pm
index 5d5e8d5aa..eb8b786e8 100644
--- a/IkiWiki/Plugin/haiku.pm
+++ b/IkiWiki/Plugin/haiku.pm
@@ -7,9 +7,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "haiku", call => \&getsetup);
hook(type => "preprocess", id => "haiku", call => \&preprocess);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Plugin/hnb.pm b/IkiWiki/Plugin/hnb.pm
index 846b0f2c9..40e4f9452 100644
--- a/IkiWiki/Plugin/hnb.pm
+++ b/IkiWiki/Plugin/hnb.pm
@@ -13,11 +13,20 @@ use strict;
use IkiWiki 2.00;
use File::Temp qw(:mktemp);
-sub import {
+sub import { #{{{
+ hook(type => "getsetup", id => "hnb", call => \&getsetup);
hook(type => "htmlize", id => "hnb", call => \&htmlize);
-}
+} #}}}
-sub htmlize (@) {
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
+} #}}}
+
+sub htmlize (@) { #{{{
my %params = @_;
# hnb outputs version number etc. every time to STDOUT, so
@@ -43,6 +52,6 @@ sub htmlize (@) {
$ret =~ s/<body>.*//si;
return $ret;
-}
+} #}}}
1;
diff --git a/IkiWiki/Plugin/html.pm b/IkiWiki/Plugin/html.pm
index 7623ba6a9..b75207578 100644
--- a/IkiWiki/Plugin/html.pm
+++ b/IkiWiki/Plugin/html.pm
@@ -7,6 +7,7 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "html", call => \&getsetup);
hook(type => "htmlize", id => "html", call => \&htmlize);
hook(type => "htmlize", id => "htm", call => \&htmlize);
@@ -15,6 +16,14 @@ sub import { #{{{
$config{wiki_file_prune_regexps} = [ grep { !m/\\\.x\?html\?\$/ } @{$config{wiki_file_prune_regexps}} ];
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
+} #}}}
+
sub htmlize (@) { #{{{
my %params=@_;
return $params{content};
diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm
index 3bdaccea1..923907b04 100644
--- a/IkiWiki/Plugin/htmlscrubber.pm
+++ b/IkiWiki/Plugin/htmlscrubber.pm
@@ -10,6 +10,7 @@ use IkiWiki 2.00;
our $safe_url_regexp;
sub import { #{{{
+ hook(type => "getsetup", id => "htmlscrubber", call => \&getsetup);
hook(type => "sanitize", id => "htmlscrubber", call => \&sanitize);
# Only known uri schemes are allowed to avoid all the ways of
@@ -34,6 +35,14 @@ sub import { #{{{
$safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/|[^:]+(?:$|\/))/i;
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub sanitize (@) { #{{{
my %params=@_;
return scrubber()->scrub($params{content});
diff --git a/IkiWiki/Plugin/htmltidy.pm b/IkiWiki/Plugin/htmltidy.pm
index 9591fbe04..d9aaba4ca 100644
--- a/IkiWiki/Plugin/htmltidy.pm
+++ b/IkiWiki/Plugin/htmltidy.pm
@@ -13,9 +13,18 @@ use IkiWiki 2.00;
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "tidy", call => \&getsetup);
hook(type => "sanitize", id => "tidy", call => \&sanitize);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub sanitize (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm
index d28b6d2d0..fc0cffb1e 100644
--- a/IkiWiki/Plugin/httpauth.pm
+++ b/IkiWiki/Plugin/httpauth.pm
@@ -7,9 +7,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "httpauth", call => \&getsetup);
hook(type => "auth", id => "httpauth", call => \&auth);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
+
sub auth ($$) { #{{{
my $cgi=shift;
my $session=shift;
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index 748d28ace..66cc08530 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -10,9 +10,18 @@ use IkiWiki 2.00;
my %imgdefaults;
sub import { #{{{
+ hook(type => "getsetup", id => "img", call => \&getsetup);
hook(type => "preprocess", id => "img", call => \&preprocess, scan => 1);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my ($image) = $_[0] =~ /$config{wiki_file_regexp}/; # untaint
my %params=@_;
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index ed7a58408..9c336e7d7 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -47,6 +47,10 @@ sub getopt () { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
rss => {
type => "boolean",
example => 0,
diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm
index 2ea6aa19e..957355643 100644
--- a/IkiWiki/Plugin/link.pm
+++ b/IkiWiki/Plugin/link.pm
@@ -8,12 +8,21 @@ use IkiWiki 2.00;
my $link_regexp;
sub import { #{{{
+ hook(type => "getsetup", id => "link", call => \&getsetup);
hook(type => "checkconfig", id => "link", call => \&checkconfig);
hook(type => "linkify", id => "link", call => \&linkify);
hook(type => "scan", id => "link", call => \&scan);
hook(type => "renamepage", id => "link", call => \&renamepage);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+} #}}}
+
sub checkconfig () { #{{{
if ($config{prefix_directives}) {
$link_regexp = qr{
diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm
index ab199b723..81ee665c8 100644
--- a/IkiWiki/Plugin/linkmap.pm
+++ b/IkiWiki/Plugin/linkmap.pm
@@ -7,10 +7,19 @@ use IkiWiki 2.00;
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "linkmap", call => \&getsetup);
hook(type => "preprocess", id => "linkmap", call => \&preprocess);
hook(type => "format", id => "linkmap", call => \&format);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
my $mapnum=0;
my %maps;
diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm
index 525fcb0e5..7462de41c 100644
--- a/IkiWiki/Plugin/lockedit.pm
+++ b/IkiWiki/Plugin/lockedit.pm
@@ -14,6 +14,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
locked_pages => {
type => "pagespec",
example => "!*/Discussion",
diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm
index 5b6a843e7..4a89fbc35 100644
--- a/IkiWiki/Plugin/map.pm
+++ b/IkiWiki/Plugin/map.pm
@@ -12,9 +12,18 @@ use strict;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "map", call => \&getsetup);
hook(type => "preprocess", id => "map", call => \&preprocess);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
$params{pages}="*" unless defined $params{pages};
diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm
index 332325adc..6c1d2ef3c 100644
--- a/IkiWiki/Plugin/mdwn.pm
+++ b/IkiWiki/Plugin/mdwn.pm
@@ -13,6 +13,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
multimarkdown => {
type => "boolean",
example => 0,
diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm
index 23bebaaad..7aceebcdb 100644
--- a/IkiWiki/Plugin/mercurial.pm
+++ b/IkiWiki/Plugin/mercurial.pm
@@ -33,6 +33,10 @@ sub checkconfig () { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
mercurial_wrapper => {
type => "string",
#example => # FIXME add example
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 4e0e9e8c7..b2c85c892 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -9,11 +9,20 @@ use IkiWiki 2.00;
my %metaheaders;
sub import { #{{{
+ hook(type => "getsetup", id => "meta", call => \&getsetup);
hook(type => "needsbuild", id => "meta", call => \&needsbuild);
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
hook(type => "pagetemplate", id => "meta", call => \&pagetemplate);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub needsbuild (@) { #{{{
my $needsbuild=shift;
foreach my $page (keys %pagestate) {
diff --git a/IkiWiki/Plugin/mirrorlist.pm b/IkiWiki/Plugin/mirrorlist.pm
index f7c78fdee..7e53fe068 100644
--- a/IkiWiki/Plugin/mirrorlist.pm
+++ b/IkiWiki/Plugin/mirrorlist.pm
@@ -12,6 +12,10 @@ sub import { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
mirrorlist => {
type => "string",
example => {},
diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm
index bdc6ee786..40a41c765 100644
--- a/IkiWiki/Plugin/monotone.pm
+++ b/IkiWiki/Plugin/monotone.pm
@@ -65,6 +65,10 @@ sub checkconfig () { #{{{
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
mtn_wrapper => {
type => "string",
example => "/srv/mtn/wiki/_MTN/ikiwiki-netsync-hook",
diff --git a/IkiWiki/Plugin/more.pm b/IkiWiki/Plugin/more.pm
index 667cd6415..4484441c3 100644
--- a/IkiWiki/Plugin/more.pm
+++ b/IkiWiki/Plugin/more.pm
@@ -8,9 +8,18 @@ use IkiWiki 2.00;
my $linktext = gettext("more");
sub import { #{{{
- hook(type => "preprocess", id => "more", call => \&preprocess);
+ hook(type => "getsetup", id => "more", call => \&getsetup);
+ hook(type => "preprocess", id => "more", call => \&preprocess);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm
index 72c66569c..58c26b633 100644
--- a/IkiWiki/Plugin/norcs.pm
+++ b/IkiWiki/Plugin/norcs.pm
@@ -7,6 +7,7 @@ use strict;
use IkiWiki;
sub import { #{{{
+ hook(type => "getsetup", id => "norcs", call => \&getsetup);
hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
hook(type => "rcs", id => "rcs_prepedit", call => \&rcs_prepedit);
hook(type => "rcs", id => "rcs_commit", call => \&rcs_commit);
@@ -19,6 +20,15 @@ sub import { #{{{
hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => 0,
+ },
+} #}}}
+
+
sub rcs_update () { #{{{
} #}}}
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm
index aed2ddf64..4670d69c0 100644
--- a/IkiWiki/Plugin/websetup.pm
+++ b/IkiWiki/Plugin/websetup.pm
@@ -85,8 +85,7 @@ sub showfields ($$$@) { #{{{
my $plugin_forced=defined $plugin && (! $plugininfo{safe} ||
(exists $config{websetup_force_plugins} && grep { $_ eq $plugin } @{$config{websetup_force_plugins}}));
if ($plugin_forced && ! $enabled) {
- # plugin is disabled and cannot be turned on,
- # so skip its configuration
+ # plugin is forced disabled, so skip its configuration
return;
}