]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Add feedshow parameter to inline, which can be useful for eg, removing
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 14 Apr 2007 20:58:02 +0000 (20:58 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 14 Apr 2007 20:58:02 +0000 (20:58 +0000)
  old posts from feeds when permalinks change.

IkiWiki/Plugin/inline.pm
debian/changelog
doc/plugins/inline.mdwn
doc/tips/howto_avoid_flooding_aggregators.mdwn
po/ikiwiki.pot

index 452fdd267eab2d0b3b2e3fc182171f76ffa60dde..417eec8f3c93721af1dbecc8504de400bb8039c7 100644 (file)
@@ -222,6 +222,9 @@ sub preprocess_inline (@) { #{{{
                if (exists $params{feedshow} && @list > $params{feedshow}) {
                        @list=@list[0..$params{feedshow} - 1];
                }
+               if (exists $params{feedpages}) {
+                       @list=grep { pagespec_match($_, $params{feedpages}, $params{page}) } @list;
+               }
        
                if ($rss) {
                        my $rssp=rsspage($params{page});
index 93f2de3666197a10f75e21f25e9031619b94af01..20e92c43c0765e1a30bf8b450040fbb4bed938be 100644 (file)
@@ -32,8 +32,10 @@ ikiwiki (1.50) UNRELEASED; urgency=low
   * Patch from Tuomov to link to the directory in feeds when usedirs is in
     effect. Note that this changes permalinks, so if you are already using
     usedirs you'll have to deal with that on upgrade to this version.
+  * Add feedshow parameter to inline, which can be useful for eg, removing
+    old posts from feeds when permalinks change.
 
- -- Joey Hess <joeyh@debian.org>  Sat, 14 Apr 2007 16:11:30 -0400
+ -- Joey Hess <joeyh@debian.org>  Sat, 14 Apr 2007 16:52:46 -0400
 
 ikiwiki (1.49) unstable; urgency=low
 
index 7c8f54d11bd7b5fec6edc60cde206a6592177bb1..44e29d0c577068eb0fb2fa5dfcd1eac14551fa0c 100644 (file)
@@ -17,10 +17,6 @@ directive:
 * `show` - Specify the maximum number of matching pages to inline.
   Default is 10, unless archiving, when the default is to show all.
   Set to 0 to show all matching pages.
-* `feedshow` - Specify the maximum number of matching pages to include in
-  the rss/atom feeds. The default is the same as the `show` value above,
-  and it cannot be larger than that value, but can be set to a smaller
-  value to avoid producing excessively large feed files.
 * `skip` - Specify a number of pages to skip displaying. Can be useful
   to produce a feed that only shows archived pages.
 * `rss` - controls generation of an rss feed. On by default if the wiki is
@@ -56,3 +52,11 @@ directive:
   sort newest created pages first. Setting it to "title" will sort pages by
   title, and "mtime" sorts most recently modified pages first.
 * `reverse` - If set to "yes", causes the sort order to be reversed.
+* `feedpages` - A [[PageSpec]] of inlined pages to include in the rss/atom
+  feeds. The default is the same as the `pages` value above, and only pages
+  matches by that value are included, but some of those can be excluded by
+  specifying a tighter [[PageSpec]] here.
+* `feedshow` - Specify the maximum number of matching pages to include in
+  the rss/atom feeds. The default is the same as the `show` value above,
+  and it cannot be larger than that value, but can be set to a smaller
+  value to avoid producing excessively large feed files.
index d432464fc21ba486101813acf1dd2e92b8f204b1..355e0e6a775bdc11bcbecc11c3a7435c06015b82 100644 (file)
@@ -15,11 +15,11 @@ This can happen in a lot of situations:
 
 To avoid annoying readers in these situations, it's a good idea to remove
 and existing items from your blog's news feed. That way only new items will
-show up in the aggregator. The best way to do this is currently to modify
-the [[PageSpec]] for your [[blog]] and add a condition such as:
+show up in the aggregator. The best way to do this is to add a `feedpages`
+parameter to the `inline` directive for your blog, with a condition such as:
 
-       and created_after(blog/posts/old_post)
+       feedpages=created_after(blog/posts/old_post)
 
 Where "old_post" is the name of the last post you made to the blog before
-making the change. This will limit the feed to only newer posts (the older
-posts will still be available in the archives).
+making the change. This will limit the feed to only newer posts, while stil
+displaying the old posts in the blog page.
index cd5e2ac19d78d5164ec67821896247ef701f86d3..6869f40208e37f783abcc72cc0e7441b9fca4779 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-04-14 16:40-0400\n"
+"POT-Creation-Date: 2007-04-14 16:56-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -173,7 +173,7 @@ msgstr ""
 msgid "Discussion"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:399
+#: ../IkiWiki/Plugin/inline.pm:402
 msgid "RPC::XML::Client not found, not pinging"
 msgstr ""