diff options
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 14 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | doc/ikiwiki/directive/inline.mdwn | 2 |
3 files changed, 20 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 455ac3ad5..0380bec3d 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -186,6 +186,13 @@ sub preprocess_inline (@) { if (! exists $params{feedshow} && exists $params{show}) { $params{feedshow}=$params{show}; } + my $title; + if (exists $params{title}) { + $title = $params{title}; + } + else { + $title = $params{page} ne "index" ? pagetitle($params{page}) : $config{wikiname}; + } my $desc; if (exists $params{description}) { $desc = $params{description} @@ -465,7 +472,7 @@ sub preprocess_inline (@) { if (! $params{preview}) { writefile($rssp, $config{destdir}, genfeed("rss", - $config{url}."/".$rssp, $desc, $params{guid}, $params{page}, @feedlist)); + $config{url}."/".$rssp, $title, $desc, $params{guid}, $params{page}, @feedlist)); $toping{$params{destpage}}=1 unless $config{rebuild}; $feedlinks{$params{destpage}}.=qq{<link rel="alternate" type="application/rss+xml" title="$rssdesc" href="$rssurl" />}; } @@ -475,7 +482,7 @@ sub preprocess_inline (@) { will_render($params{destpage}, $atomp); if (! $params{preview}) { writefile($atomp, $config{destdir}, - genfeed("atom", $config{url}."/".$atomp, $desc, $params{guid}, $params{page}, @feedlist)); + genfeed("atom", $config{url}."/".$atomp, $title, $desc, $params{guid}, $params{page}, @feedlist)); $toping{$params{destpage}}=1 unless $config{rebuild}; $feedlinks{$params{destpage}}.=qq{<link rel="alternate" type="application/atom+xml" title="$atomdesc" href="$atomurl" />}; } @@ -634,6 +641,7 @@ sub genenclosure { sub genfeed ($$$$$@) { my $feedtype=shift; my $feedurl=shift; + my $feedtitle=shift; my $feeddesc=shift; my $guid=shift; my $page=shift; @@ -699,7 +707,7 @@ sub genfeed ($$$$$@) { my $template=template_depends($feedtype."page.tmpl", $page, blind_cache => 1); $template->param( - title => $page ne "index" ? pagetitle($page) : $config{wikiname}, + title => $feedtitle, wikiname => $config{wikiname}, pageurl => $url, content => $content, diff --git a/debian/changelog b/debian/changelog index c465111f6..7eeec77f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20140103) UNRELEASED; urgency=medium + + * inline: Allow overriding the title of the feed. Closes: #735123 + Thanks, Christophe Rhodes + + -- Joey Hess <joeyh@debian.org> Mon, 13 Jan 2014 17:06:01 -0400 + ikiwiki (3.20140102) unstable; urgency=low * aggregate: Improve display of post author. diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index d2f6d1d74..a4632a5b4 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -51,6 +51,8 @@ directive. These are the commonly used ones: Set to 0 to show all matching pages. * `archive` - If set to "yes", only list page titles and some metadata, not full contents. +* `title` - Sets the title of the rss feed if one is generated. + Defaults to the name of the page. * `description` - Sets the description of the rss feed if one is generated. Defaults to the name of the wiki. * `skip` - Specify a number of pages to skip displaying. Can be useful |