X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/678d467a4080dd549f2b6f276f963eac384e1b4f..9da467f063231185de7b336c36a62c08d1258ff4:/IkiWiki/Plugin/listdirectives.pm?ds=sidebyside

diff --git a/IkiWiki/Plugin/listdirectives.pm b/IkiWiki/Plugin/listdirectives.pm
index d2cebca34..835e25388 100644
--- a/IkiWiki/Plugin/listdirectives.pm
+++ b/IkiWiki/Plugin/listdirectives.pm
@@ -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>';
 	}