]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/aggregate.mdwn
Change Projects link to point to projects DB
[ikiwiki.git] / doc / ikiwiki / directive / aggregate.mdwn
1 The `aggregate` directive is supplied by the [[!iki plugins/aggregate desc=aggregate]] plugin.
2 This plugin requires extra setup, specifically, a cron job. See the
3 plugin's documentation for details.
4
5 This directive allows content from other feeds to be aggregated into the wiki.
6 Aggregate a feed as follows:
7
8         \[[!aggregate name="example blog" dir="example"
9         feedurl="http://example.com/index.rss"
10         url="http://example.com/" updateinterval="15"]]
11
12 That example aggregates posts from the specified RSS feed, updating no
13 more frequently than once every 15 minutes (though possibly less
14 frequently, if the cron job runs less frequently than that), and puts a
15 page per post under the example/ directory in the wiki.
16
17 You can then use ikiwiki's [[inline]] directive to create a blog of one or
18 more aggregated feeds. For example:
19
20         \[[!inline pages="internal(example/*)"]]
21
22 Note the use of `internal()` in the [[ikiwiki/PageSpec]] to match
23 aggregated pages. By default, aggregated pages are internal pages,
24 which prevents them from showing up directly in the wiki, and so this
25 special [[PageSpec]] is needed to match them.
26
27 ## usage
28
29 Here are descriptions of all the supported parameters to the `aggregate`
30 directive:
31
32 * `name` - A name for the feed. Each feed must have a unique name.
33   Required.
34 * `url` - The url to the web page for the feed that's being aggregated.
35   Required.
36 * `dir` - The directory in the wiki where pages should be saved. Optional,
37   if not specified, the directory is based on the name of the feed.
38 * `feedurl` - The url to the feed. Optional, if it's not specified ikiwiki
39   will look for feeds on the `url`. RSS and atom feeds are supported.
40 * `updateinterval` - How often to check for new posts, in minutes. Default
41   is 15 minutes.
42 * `expireage` - Expire old items from this feed if they are older than
43   a specified number of days. Default is to never expire on age.
44 * `expirecount` - Expire old items from this feed if there are more than
45   the specified number total. Oldest items will be expired first. Default
46   is to never expire on count.
47 * `tag` - A tag to tag each post from the feed with. A good tag to use is
48   the name of the feed. Can be repeated multiple times. The [[tag]] plugin
49   must be enabled for this to work.
50 * `template` - Template to use for creating the aggregated pages. Defaults to
51   aggregatepost.
52
53 Note that even if you are using subversion or another revision control
54 system, pages created by aggregation will *not* be checked into revision
55 control.
56
57 [[!meta robots="noindex, follow"]]