X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/435e06bce1fb8efe209ca0a7edf2c9f4d40db478..b90f8397f6f0c9c9e9de85ef04c32dba998c31a6:/IkiWiki/Plugin/typography.pm?ds=inline 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=@_;