if (! exists $params{show} && ! $archive) {
$params{show}=10;
}
+ my $desc;
+ if (exists $params{description}) {
+ $desc = $params{description}
+ } else {
+ $desc = $config{wikiname};
+ }
my @list;
foreach my $page (keys %pagesources) {
# only supports listing one file per page.
if ($config{rss} && $rss) {
writefile(rsspage($params{page}), $config{destdir},
- genrss($params{page}, @list));
+ genrss($desc, $params{page}, @list));
$toping{$params{page}}=1 unless $config{rebuild};
}
return $page.".rss";
} #}}}
-sub genrss ($@) { #{{{
+sub genrss ($$@) { #{{{
+ my $desc = shift;
my $page=shift;
my @pages=@_;
wikiname => $config{wikiname},
pageurl => $url,
content => $content,
+ rssdesc => $desc,
);
run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
* Support running "perl Makefile.PL PREFIX=foo" to build ikiwiki to run
from a different directory.
* Generalised preprocesser loop protection code.
+ * Patch from James Westby to allow a description to be set for rss feeds.
- -- Joey Hess <joeyh@debian.org> Fri, 25 Aug 2006 14:48:36 -0400
+ -- Joey Hess <joeyh@debian.org> Sat, 26 Aug 2006 13:26:22 -0400
ikiwiki (1.21) unstable; urgency=low
if raw is set to "yes", the page will be included raw, without additional
markup around it, as if it were a literal part of the source of the
inlining page.
+* `description` - Sets the description of the rss feed if one is generated.
+ Defaults to the name of the wiki.
Thanks. -- JamesWestby
My patch can be found at <http://jameswestby.net/scratch/blog-desc.diff> -- JamesWestby
+
+ Thanks, [[todo/done]] --[[Joey]]
<channel>
<title><TMPL_VAR TITLE ESCAPE=HTML></title>
<link><TMPL_VAR PAGEURL></link>
-<description><TMPL_VAR WIKINAME ESCAPE=HTML></description>
+<description><TMPL_VAR RSSDESC ESCAPE=HTML></description>
<TMPL_VAR CONTENT>
</channel>
</rss>