* Patch from James Westby to allow a description to be set for rss feeds.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 26 Aug 2006 17:36:46 +0000 (17:36 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 26 Aug 2006 17:36:46 +0000 (17:36 +0000)
IkiWiki/Plugin/inline.pm
debian/changelog
doc/plugins/inline.mdwn
doc/todo/rss_title_description.mdwn
templates/rsspage.tmpl

index e7ec238ed96de84405327cbb03f92e4a6ed06f0c..fe7dde14cfbec98c30d0a30c6696868486083c51 100644 (file)
@@ -40,6 +40,12 @@ sub preprocess_inline (@) { #{{{
        if (! exists $params{show} && ! $archive) {
                $params{show}=10;
        }
        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) {
 
        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},
        # 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};
        }
        
                $toping{$params{page}}=1 unless $config{rebuild};
        }
        
@@ -178,7 +184,8 @@ sub rsspage ($) { #{{{
        return $page.".rss";
 } #}}}
 
        return $page.".rss";
 } #}}}
 
-sub genrss ($@) { #{{{
+sub genrss ($$@) { #{{{
+       my $desc = shift;
        my $page=shift;
        my @pages=@_;
        
        my $page=shift;
        my @pages=@_;
        
@@ -213,6 +220,7 @@ sub genrss ($@) { #{{{
                wikiname => $config{wikiname},
                pageurl => $url,
                content => $content,
                wikiname => $config{wikiname},
                pageurl => $url,
                content => $content,
+               rssdesc => $desc,
        );
        run_hooks(pagetemplate => sub {
                shift->(page => $page, destpage => $page,
        );
        run_hooks(pagetemplate => sub {
                shift->(page => $page, destpage => $page,
index 875d4f9a966897bea2050a314e14f41df89322fb..e36ad1c8b73dd11fb4b95029bc033bed18cc065e 100644 (file)
@@ -31,8 +31,9 @@ ikiwiki (1.22) UNRELEASED; urgency=low
   * Support running "perl Makefile.PL PREFIX=foo" to build ikiwiki to run
     from a different directory.
   * Generalised preprocesser loop protection code.
   * Support running "perl Makefile.PL PREFIX=foo" to build ikiwiki to run
     from a different directory.
   * Generalised preprocesser loop protection code.
+  * Patch from James Westby to allow a description to be set for rss feeds.
 
 
- -- Joey Hess <joeyh@debian.org>  Fri, 25 Aug 2006 14:48:36 -0400
+ -- Joey Hess <joeyh@debian.org>  Sat, 26 Aug 2006 13:26:22 -0400
 
 ikiwiki (1.21) unstable; urgency=low
 
 
 ikiwiki (1.21) unstable; urgency=low
 
index d2d13e5fc37d31946802142ad7ace80ca4299ebe..f4110fe45bbe5aacc3e17be229007f568c53cb3c 100644 (file)
@@ -27,3 +27,5 @@ directive:
   if raw is set to "yes", the page will be included raw, without additional
   markup around it, as if it were a literal part of the source of the 
   inlining page.
   if raw is set to "yes", the page will be included raw, without additional
   markup around it, as if it were a literal part of the source of the 
   inlining page.
+* `description` - Sets the description of the rss feed if one is generated.
+  Defaults to the name of the wiki.
index 59d1d5da9a938ad6a3a44d3b8ecaa664855633e2..0fb3e954ee2142a6391571dc06604806aa63504b 100644 (file)
@@ -31,3 +31,5 @@ I must have done something wrong. I'll have a look at implementing the descripti
 Thanks. -- JamesWestby
 
 My patch can be found at <http://jameswestby.net/scratch/blog-desc.diff> -- JamesWestby
 Thanks. -- JamesWestby
 
 My patch can be found at <http://jameswestby.net/scratch/blog-desc.diff> -- JamesWestby
+
+       Thanks, [[todo/done]] --[[Joey]]
index d78f94edfbc2738fe31e6f347c1511b5a273f99a..4ec143903987a3b086a728518b386f55d3671521 100644 (file)
@@ -4,7 +4,7 @@
 <channel>
 <title><TMPL_VAR TITLE ESCAPE=HTML></title>
 <link><TMPL_VAR PAGEURL></link>
 <channel>
 <title><TMPL_VAR TITLE ESCAPE=HTML></title>
 <link><TMPL_VAR PAGEURL></link>
-<description><TMPL_VAR WIKINAME ESCAPE=HTML></description>
+<description><TMPL_VAR RSSDESC ESCAPE=HTML></description>
 <TMPL_VAR CONTENT>
 </channel>
 </rss>
 <TMPL_VAR CONTENT>
 </channel>
 </rss>