X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/18b3e970ffcc0f74d68538b7094f76442a294609..e8a23c299e0ec548110283516b8413cdaff8737e:/IkiWiki/Plugin/polygen.pm diff --git a/IkiWiki/Plugin/polygen.pm b/IkiWiki/Plugin/polygen.pm index 70378cf1b..78e3611e1 100644 --- a/IkiWiki/Plugin/polygen.pm +++ b/IkiWiki/Plugin/polygen.pm @@ -7,14 +7,24 @@ package IkiWiki::Plugin::polygen; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; use File::Find; -sub import { #{{{ +sub import { + hook(type => "getsetup", id => "polygen", call => \&getsetup); hook(type => "preprocess", id => "polygen", call => \&preprocess); -} # }}} +} -sub preprocess (@) { #{{{ +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + section => "widget", + }, +} + +sub preprocess (@) { my %params=@_; my $grammar = ($params{grammar} or 'polygen'); my $symbol = ($params{symbol} or undef); @@ -55,6 +65,6 @@ sub preprocess (@) { #{{{ # markdown text $res =~ s/\s*$//; return $res; -} # }}} +} 1