]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/linkmap.pm
po plugin: created OTHERLANGUAGES template loop
[git.ikiwiki.info.git] / IkiWiki / Plugin / linkmap.pm
index 82b38f4cb79909c449e29bd8a68340db9d343bde..81ee665c8c5513cc5a1acdcf16a93028ad9bb141 100644 (file)
@@ -7,10 +7,19 @@ use IkiWiki 2.00;
 use IPC::Open2;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "linkmap", call => \&getsetup);
        hook(type => "preprocess", id => "linkmap", call => \&preprocess);
        hook(type => "format", id => "linkmap", call => \&format);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 my $mapnum=0;
 my %maps;
 
@@ -94,9 +103,7 @@ sub genmap ($) { #{{{
        
        waitpid $pid, 0;
        $SIG{PIPE}="DEFAULT";
-       if ($sigpipe) {
-               return  "[[linkmap ".gettext("failed to run dot")."]]";
-       }
+       error gettext("failed to run dot") if $sigpipe;
 
        return $ret;
 } #}}}