summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-02-04 18:46:34 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-02-04 18:46:34 -0500
commitf64ef7deb643f9bc4bb911cd858db96c2f528f87 (patch)
treef2420e0589dbec2cf4a705f581500f7ad4a4dadd
parent5c0e0e19d17ceb8f2ad3027db652f3ef147212fe (diff)
proper fix for the preview/will_render issue
-rw-r--r--IkiWiki/Plugin/inline.pm24
1 files changed, 14 insertions, 10 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index d58c655c5..b40303078 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -286,21 +286,25 @@ sub preprocess_inline (@) { #{{{
@list=grep { pagespec_match($_, $params{feedpages}, location => $params{page}) } @list;
}
- if ($rss && ! $params{preview}) {
+ if ($rss) {
my $rssp=rsspage($params{destpage}).$feednum;
will_render($params{destpage}, $rssp);
- writefile($rssp, $config{destdir},
- genfeed("rss", $rssurl, $desc, $params{destpage}, @list));
- $toping{$params{destpage}}=1 unless $config{rebuild};
- $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
+ if (! $params{preview}) {
+ writefile($rssp, $config{destdir},
+ genfeed("rss", $rssurl, $desc, $params{destpage}, @list));
+ $toping{$params{destpage}}=1 unless $config{rebuild};
+ $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
+ }
}
- if ($atom && ! $params{preview}) {
+ if ($atom) {
my $atomp=atompage($params{destpage}).$feednum;
will_render($params{destpage}, $atomp);
- writefile($atomp, $config{destdir},
- genfeed("atom", $atomurl, $desc, $params{destpage}, @list));
- $toping{$params{destpage}}=1 unless $config{rebuild};
- $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/atom+xml" title="Atom" href="$atomurl" />};
+ if (! $params{preview}) {
+ writefile($atomp, $config{destdir},
+ genfeed("atom", $atomurl, $desc, $params{destpage}, @list));
+ $toping{$params{destpage}}=1 unless $config{rebuild};
+ $feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/atom+xml" title="Atom" href="$atomurl" />};
+ }
}
}