aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-26 17:36:46 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-26 17:36:46 +0000
commit38ce4c3cef71518610cb934fde171e2d4aeff99e (patch)
tree5671c2cd337f44f872b5d14f4588ef69c29d8407 /IkiWiki/Plugin
parentd214af5cfb19956920784b266f5050a28d4c0fa4 (diff)
downloadikiwiki-38ce4c3cef71518610cb934fde171e2d4aeff99e.tar
ikiwiki-38ce4c3cef71518610cb934fde171e2d4aeff99e.tar.gz
* Patch from James Westby to allow a description to be set for rss feeds.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/inline.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index e7ec238ed..fe7dde14c 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -40,6 +40,12 @@ sub preprocess_inline (@) { #{{{
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) {
@@ -124,7 +130,7 @@ sub preprocess_inline (@) { #{{{
# 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};
}
@@ -178,7 +184,8 @@ sub rsspage ($) { #{{{
return $page.".rss";
} #}}}
-sub genrss ($@) { #{{{
+sub genrss ($$@) { #{{{
+ my $desc = shift;
my $page=shift;
my @pages=@_;
@@ -213,6 +220,7 @@ sub genrss ($@) { #{{{
wikiname => $config{wikiname},
pageurl => $url,
content => $content,
+ rssdesc => $desc,
);
run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,