Package: ikiwiki Version: 3.20120629 Severity: wishlist Dear Joey,
A reader of my blog asked me to alter the <title> element of the feeds to something more descriptive than just 'blog' -- but I didn't want to alter the page title within the overall ikiwiki instance. (Nor did I particularly feel like I should be maintaining my own feed templates just for this). So, please consider adding a title parameter to the inline directive, which would override the current default title (the including page title, or the wikiname if it's the index page). If reportbug will let me, I'll attach a patch to this report to that effect (against 3.20120629, sorry; I looked at HEAD and didn't see anything that would be problematic at a glance). -- System Information: Debian Release: jessie/sid APT prefers stable APT policy: (900, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.10-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
--- ikiwiki-3.20120629/doc/ikiwiki/directive/inline.mdwn 2012-05-27 22:56:03.000000000 +0200 +++ ikiwiki-3.20120629~csr1/doc/ikiwiki/directive/inline.mdwn 2014-01-12 21:35:02.000000000 +0100 @@ -49,6 +49,8 @@ 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 --- ikiwiki-3.20120629/IkiWiki/Plugin/inline.pm 2012-05-17 06:31:15.000000000 +0200 +++ ikiwiki-3.20120629~csr1/IkiWiki/Plugin/inline.pm 2014-01-12 21:41:55.000000000 +0100 @@ -186,6 +186,13 @@ 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 @@ 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 @@ 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" />}; } @@ -614,6 +621,7 @@ sub genfeed ($$$$$@) { my $feedtype=shift; my $feedurl=shift; + my $feedtitle=shift; my $feeddesc=shift; my $guid=shift; my $page=shift; @@ -687,7 +695,7 @@ 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,