summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-25 17:24:52 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-25 17:24:52 -0400
commitbf6198baf3d8ca546ff2c6651f78152f3578792a (patch)
treedb69fb7717d1e0e653577c964ecf534a29c6b2e8 /IkiWiki/Plugin
parenta71b9a1cf1322cd1423971483969d37efa5ebcf8 (diff)
add getconfig for inline
Also, moved the pingurl getopt parsing to inline.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/inline.pm46
1 files changed, 45 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 2f0901943..3ca4fccdf 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -15,6 +15,7 @@ my $nested=0;
sub import { #{{{
hook(type => "getopt", id => "inline", call => \&getopt);
+ hook(type => "getsetup", id => "inline", call => \&getsetup);
hook(type => "checkconfig", id => "inline", call => \&checkconfig);
hook(type => "sessioncgi", id => "inline", call => \&sessioncgi);
hook(type => "preprocess", id => "inline",
@@ -39,8 +40,51 @@ sub getopt () { #{{{
"atom!" => \$config{atom},
"allowrss!" => \$config{allowrss},
"allowatom!" => \$config{allowatom},
+ "pingurl=s" => sub {
+ push @{$config{pingurl}}, $_[1];
+ },
);
-}
+} #}}}
+
+sub getsetup () { #{{{
+ return
+ rss => {
+ type => "boolean",
+ default => 0,
+ description => "enable rss feeds by default",
+ safe => 1,
+ rebuild => 1,
+ },
+ atom => {
+ type => "boolean",
+ default => 0,
+ description => "enable atom feeds by default",
+ safe => 1,
+ rebuild => 1,
+ },
+ allowrss => {
+ type => "boolean",
+ default => 0,
+ description => "allow rss feeds to be used",
+ safe => 1,
+ rebuild => 1,
+ },
+ allowatom => {
+ type => "boolean",
+ default => 0,
+ description => "allow atom feeds to be used",
+ safe => 1,
+ rebuild => 1,
+ },
+ pingurl => {
+ type => "string",
+ default => "",
+ example => "http://rpc.technorati.com/rpc/ping",
+ description => "urls to ping (using XMP-RPC) on feed update",
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
sub checkconfig () { #{{{
if (($config{rss} || $config{atom}) && ! length $config{url}) {