- my %mapitems = ();
- foreach my $item (keys %IkiWiki::links) {
- if (IkiWiki::pagespec_match($item, $params{pages})) {
- my $link=IkiWiki::htmlpage($item);
- $link=IkiWiki::abs2rel($link, IkiWiki::dirname($params{page}));
- $mapitems{$item}=$link;
- }
- }
+ my %mapitems = map { $_ => urlto($_, $params{destpage}) }
+ pagespec_match_list($params{page}, $params{pages},
+ # update when a page is added or removed, or its
+ # links change
+ deptype => deptype("presence", "links"));
+
+ my $dest=$params{page}."/linkmap.png";