]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/listdirectives.pm
the problem is with YAML::Any, hardcoding YAML::XS fixes the issue. delimiters are...
[git.ikiwiki.info.git] / IkiWiki / Plugin / listdirectives.pm
index be82b0495f4d3481a80cf9ca33e981adf6f49ae8..835e253886d67e2223bab034643c4823fa8d23bb 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::listdirectives;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 sub import {
        add_underlay("directives");
@@ -19,6 +19,7 @@ sub getsetup () {
                plugin => {
                        safe => 1,
                        rebuild => undef,
+                       section => "widget",
                },
                directive_description_dir => {
                        type => "string",
@@ -45,7 +46,7 @@ sub checkconfig () {
 sub needsbuild (@) {
        my $needsbuild=shift;
 
-       @fulllist = sort keys %{$IkiWiki::hooks{preprocess}};
+       @fulllist = grep { ! /^_/ } sort keys %{$IkiWiki::hooks{preprocess}};
        @shortlist = grep { ! $IkiWiki::hooks{preprocess}{$_}{shortcut} } @fulllist;
        $pluginstring = join(' ', @shortlist) . " : " . join(' ', @fulllist);
 
@@ -63,6 +64,8 @@ sub needsbuild (@) {
                        }
                }
        }
+
+       return $needsbuild;
 }
 
 sub preprocess (@) {
@@ -84,7 +87,7 @@ sub preprocess (@) {
        foreach my $plugin (@pluginlist) {
                $result .= '<li class="listdirectives">';
                my $link=linkpage($config{directive_description_dir}."/".$plugin);
-               add_depends($params{page}, $link);
+               add_depends($params{page}, $link, deptype("presence"));
                $result .= htmllink($params{page}, $params{destpage}, $link);
                $result .= '</li>';
        }