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;
@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},
direction. No need to pull changes when doing a commit. mtn sync
is still called in rcs_update.
- Support for viewing differences via patches using viewmtn.
+ * inline: When previewing, still call will_render on rss/atom files,
+ just avoid actually writing the files. This is necessary because ikiwiki
+ saves state after a preview (in case it actually *did* write files),
+ and if will_render isn't called its security checks will get upset
+ when the page is saved. Thanks to Edward Betts for his help tracking this
+ tricky bug down.
-- Joey Hess <joeyh@debian.org> Sat, 02 Feb 2008 23:36:31 -0500