package IkiWiki;
my %toping;
-my @processing_inline;
sub yesno ($) { #{{{
my $val=shift;
sub preprocess_inline (@) { #{{{
my %params=@_;
- # Avoid nested inlines, to avoid loops etc.
- return "" if grep { $_ eq $params{page} } @processing_inline;
- push @processing_inline, $params{page};
-
if (! exists $params{pages}) {
return "";
}
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};
}
- pop @processing_inline;
return $ret;
} #}}}
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,