- # TODO: should really add this to renderedfiles and call
- # check_overwrite, but currently renderedfiles
- # only supports listing one file per page.
- if ($config{rss} && $rss) {
- writefile(rsspage($params{page}), $config{destdir},
- genrss($params{page}, @list));
- $toping{$params{page}}=1 unless $config{rebuild};
+ if ($feeds) {
+ if (exists $params{feedshow} && @list > $params{feedshow}) {
+ @list=@list[0..$params{feedshow} - 1];
+ }
+
+ if ($rss) {
+ my $rssp=rsspage($params{page});
+ will_render($params{page}, $rssp);
+ writefile($rssp, $config{destdir},
+ genfeed("rss", $rssurl, $desc, $params{page}, @list));
+ $toping{$params{page}}=1 unless $config{rebuild};
+ $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
+ }
+ if ($atom) {
+ my $atomp=atompage($params{page});
+ will_render($params{page}, $atomp);
+ writefile($atomp, $config{destdir},
+ genfeed("atom", $atomurl, $desc, $params{page}, @list));
+ $toping{$params{page}}=1 unless $config{rebuild};
+ $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/atom+xml" title="Atom" href="$atomurl" />};
+ }