]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' of ssh://git.ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Tue, 14 Jan 2014 18:52:50 +0000 (14:52 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 14 Jan 2014 18:52:50 +0000 (14:52 -0400)
IkiWiki/Plugin/inline.pm
debian/changelog
doc/ikiwiki/directive/inline.mdwn

index 455ac3ad55f4d468c80e5234816ba599f3527a33..0380bec3d6cd9948ec92229117ea3655212af59a 100644 (file)
@@ -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,
index c465111f67c1eeee429c2b0859d3659820ca2104..7eeec77f9ee0875782057b6e7ccfbb0eb98ed8d9 100644 (file)
@@ -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.
index d2f6d1d74f9102eee84162104db11726ae9eca5a..a4632a5b4c4111151b7249ffd2a7dfa8bbb181eb 100644 (file)
@@ -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