]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/typography.pm
finish adding getsetup hooks to plugins
[ikiwiki.git] / IkiWiki / Plugin / typography.pm
index fe69968981029f07e0a60c2903bfb9e02fe6a4a6..8ae1f3445c966e39bef6dfea77cd8072326c0027 100644 (file)
@@ -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,21 @@ sub getopt () { #{{{
        GetOptions("typographyattributes=s" => \$config{typographyattributes});
 } #}}}
 
+sub getsetup () { #{{{
+       eval q{use Text::Typography};
+       error($@) if $@;
+
+       return
+               typographyattributes => {
+                       type => "string",
+                       default => "3",
+                       example => "tag",
+                       description => "Text::Typography attributes value",
+                       safe => 1,
+                       rebuild => 1,
+               },
+} #}}}
+
 sub sanitize (@) { #{{{
        my %params=@_;