my $atom=($config{atom} && exists $params{atom}) ? yesno($params{atom}) : $config{atom};
my $quick=exists $params{quick} ? yesno($params{quick}) : 0;
my $feeds=exists $params{feeds} ? yesno($params{feeds}) : !$quick;
- $feeds=0 if $params{preview};
my $feedonly=yesno($params{feedonly});
if (! exists $params{show} && ! $archive) {
$params{show}=10;
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
$template->param(title => pagetitle(basename($page)));
$template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}));
+ $template->param(first => 1) if $page eq $list[0];
+ $template->param(last => 1) if $page eq $list[$#list];
if ($actions) {
my $file = $pagesources{$page};
@list=grep { pagespec_match($_, $params{feedpages}, location => $params{page}) } @list;
}
- if ($rss) {
+ if ($rss && ! $params{preview}) {
my $rssp=rsspage($params{destpage}).$feednum;
will_render($params{destpage}, $rssp);
writefile($rssp, $config{destdir},
$toping{$params{destpage}}=1 unless $config{rebuild};
$feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
}
- if ($atom) {
+ if ($atom && ! $params{preview}) {
my $atomp=atompage($params{destpage}).$feednum;
will_render($params{destpage}, $atomp);
writefile($atomp, $config{destdir},