X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2dc010d66a4e29071100910a2d888895cb74bb11..6fc66f83deba6df8abdf4bc117f8da7efbd7cbc1:/IkiWiki/Plugin/inline.pm?ds=inline
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index ec1cf0970..57b4057d7 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -81,7 +81,7 @@ sub preprocess_inline (@) { #{{{
my @list;
foreach my $page (keys %pagesources) {
next if $page eq $params{page};
- if (pagespec_match($page, $params{pages})) {
+ if (pagespec_match($page, $params{pages}, $params{page})) {
push @list, $page;
}
}
@@ -96,6 +96,10 @@ sub preprocess_inline (@) { #{{{
return sprintf(gettext("unknown sort type %s"), $params{sort});
}
+ if (yesno($params{reverse})) {
+ @list=reverse(@list);
+ }
+
if (exists $params{skip}) {
@list=@list[$params{skip} .. scalar @list - 1];
}
@@ -190,19 +194,25 @@ sub preprocess_inline (@) { #{{{
}
}
- if ($feeds && $rss) {
- will_render($params{page}, rsspage($params{page}));
- writefile(rsspage($params{page}), $config{destdir},
- genfeed("rss", $rssurl, $desc, $params{page}, @list));
- $toping{$params{page}}=1 unless $config{rebuild};
- $feedlinks{$params{destpage}}=qq{};
- }
- if ($feeds && $atom) {
- will_render($params{page}, atompage($params{page}));
- writefile(atompage($params{page}), $config{destdir},
- genfeed("atom", $atomurl, $desc, $params{page}, @list));
- $toping{$params{page}}=1 unless $config{rebuild};
- $feedlinks{$params{destpage}}=qq{};
+ if ($feeds) {
+ if (exists $params{feedshow} && @list > $params{feedshow}) {
+ @list=@list[0..$params{feedshow} - 1];
+ }
+
+ if ($rss) {
+ will_render($params{page}, rsspage($params{page}));
+ writefile(rsspage($params{page}), $config{destdir},
+ genfeed("rss", $rssurl, $desc, $params{page}, @list));
+ $toping{$params{page}}=1 unless $config{rebuild};
+ $feedlinks{$params{destpage}}=qq{};
+ }
+ if ($atom) {
+ will_render($params{page}, atompage($params{page}));
+ writefile(atompage($params{page}), $config{destdir},
+ genfeed("atom", $atomurl, $desc, $params{page}, @list));
+ $toping{$params{page}}=1 unless $config{rebuild};
+ $feedlinks{$params{destpage}}=qq{};
+ }
}
return $ret;