* Add feedshow parameter to inline, which can be useful for eg, removing

old posts from feeds when permalinks change.
master
joey 2007-04-14 20:58:02 +00:00
parent 9b145798c7
commit e855e30d01
5 changed files with 21 additions and 12 deletions

View 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});

4
debian/changelog vendored
View 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

View 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.

View 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.

View 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 ""