]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Patch from Ethan Glasser Camp to add a skip option to the inline plugin.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 8 Nov 2006 20:39:48 +0000 (20:39 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 8 Nov 2006 20:39:48 +0000 (20:39 +0000)
IkiWiki/Plugin/inline.pm
debian/changelog
doc/patchqueue/skip_option_for_inline_plugin.mdwn [deleted file]
doc/plugins/inline.mdwn
doc/todo/skip_option_for_inline_plugin.mdwn

index caef98ef2fc32fdd2c39c16b9f6a084af7dcfcbc..ad8b718f3d6062355c9189ff66862facdafd6bd0 100644 (file)
@@ -72,6 +72,10 @@ sub preprocess_inline (@) { #{{{
                return "unknown sort type $params{sort}";
        }
 
+       if (exists $params{skip}) {
+               @list=@list[$params{skip} .. scalar @list - 1];
+       }
+       
        if ($params{show} && @list > $params{show}) {
                @list=@list[0..$params{show} - 1];
        }
index ee5d81e610dd7cce21343462da469d17840a666e..122ea596bc27959b809d43b6205f42caae1bd49a 100644 (file)
@@ -5,8 +5,9 @@ ikiwiki (1.33) UNRELEASED; urgency=low
     ikiwiki.
   * Enable utf8 file IO in aggregate plugin.
   * Fix some issues with the new registration form.
+  * Patch from Ethan Glasser Camp to add a skip option to the inline plugin.
 
- -- Joey Hess <joeyh@debian.org>  Wed,  8 Nov 2006 15:13:40 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed,  8 Nov 2006 15:39:16 -0500
 
 ikiwiki (1.32) unstable; urgency=low
 
diff --git a/doc/patchqueue/skip_option_for_inline_plugin.mdwn b/doc/patchqueue/skip_option_for_inline_plugin.mdwn
deleted file mode 100644 (file)
index 2bb29ae..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-This addresses [[todo/skip_option_for_inline_plugin]].
-
-    diff -urx .svn ikiwiki-orig/IkiWiki/Plugin/inline.pm ikiwiki/IkiWiki/Plugin/inline.pm
-    --- ikiwiki-orig/IkiWiki/Plugin/inline.pm   2006-11-08 01:02:33.000000000 -0500
-    +++ ikiwiki/IkiWiki/Plugin/inline.pm        2006-11-08 15:08:04.000000000 -0500
-    @@ -72,6 +72,10 @@
-                return "unknown sort type $params{sort}";
-        }
-
-    +   if (exists $params{skip}) {
-    +           @list=@list[$params{skip} .. scalar @list - 1];
-    +
-    +   }
-        if ($params{show} && @list > $params{show}) {
-                @list=@list[0..$params{show} - 1];
-        }
index 807b7f79a26bbb817216f41eee3589e226522155..3c3d46d26ccca91021e4479fa7c0e7330ed7a27a 100644 (file)
@@ -18,6 +18,8 @@ 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.
+* `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
   configured to use rss feeds, set to "no" to disable.
 * `atom` - controls generation of an atom feed. On by default if the wiki is
index 27dea11199b6535e25fe5de4f0ef5d1ba07d0ae6..ab310dcd59501ea4106b0487abbd2dc5a881bc22 100644 (file)
@@ -3,4 +3,6 @@ How about a skip option for [[plugins/inline]]?  This would allow things like th
     \[[inline pages="news/*" show="5"]]
     \[[inline pages="news/*" skip="5" show="5" archive="yes"]]
 
-> I just wrote a patch. [[patchqueue/skip_option_for_inline_plugin]] --Ethan
\ No newline at end of file
+> I just wrote a patch. [[patchqueue/skip_option_for_inline_plugin]] --Ethan
+
+[[todo/done]] --[[Joey]]