X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/435e06bce1fb8efe209ca0a7edf2c9f4d40db478..779c5214f330269fa95a5fed5b16fe8d65730102:/IkiWiki/Plugin/typography.pm diff --git a/IkiWiki/Plugin/typography.pm b/IkiWiki/Plugin/typography.pm index 5073d51d3..27089b390 100644 --- a/IkiWiki/Plugin/typography.pm +++ b/IkiWiki/Plugin/typography.pm @@ -8,6 +8,7 @@ use IkiWiki 2.00; sub import { #{{{ hook(type => "getopt", id => "typography", call => \&getopt); + hook(type => "getsetup", id => "typography", call => \&getsetup); IkiWiki::hook(type => "sanitize", id => "typography", call => \&sanitize); } # }}} @@ -18,6 +19,25 @@ sub getopt () { #{{{ GetOptions("typographyattributes=s" => \$config{typographyattributes}); } #}}} +sub getsetup () { #{{{ + eval q{use Text::Typography}; + error($@) if $@; + + return + plugin => { + safe => 1, + rebuild => 1, + }, + typographyattributes => { + type => "string", + example => "3", + description => "Text::Typography attributes value", + advanced => 1, + safe => 1, + rebuild => 1, + }, +} #}}} + sub sanitize (@) { #{{{ my %params=@_;