aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-06-21 15:13:49 -0400
committerJoey Hess <joey@kitenet.net>2011-06-21 15:22:36 -0400
commitb5a669f34b38da86b1260ac7a5abd7a63cfad4ac (patch)
tree185ea4e20c11ccf40527f6eb8b34288f4086fa19 /IkiWiki
parent886890b82d727385f5bb167ef7684288e98a5218 (diff)
downloadikiwiki-b5a669f34b38da86b1260ac7a5abd7a63cfad4ac.tar
ikiwiki-b5a669f34b38da86b1260ac7a5abd7a63cfad4ac.tar.gz
add websetup hook
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/headinganchors.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/headinganchors.pm b/IkiWiki/Plugin/headinganchors.pm
index 80b39ec05..b29150368 100644
--- a/IkiWiki/Plugin/headinganchors.pm
+++ b/IkiWiki/Plugin/headinganchors.pm
@@ -4,12 +4,22 @@ package IkiWiki::Plugin::headinganchors;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
+ hook(type => "getsetup", id => "headinganchors", call => \&getsetup);
hook(type => "sanitize", id => "headinganchors", call => \&headinganchors);
}
+sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ section => "widget",
+ },
+}
+
sub text_to_anchor {
my $str = shift;
$str =~ s/^\s+//;