]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/calendar.mdwn
(no commit message)
[ikiwiki.git] / doc / ikiwiki / directive / calendar.mdwn
1 The `calendar` directive is supplied by the [[!iki plugins/calendar desc=calendar]] plugin.
2 This plugin requires extra setup.  See the plugin documentation for details.
3
4 This directive displays a calendar, similar to the typical calendars shown on
5 some blogs.
6
7 # examples
8
9         \[[!calendar ]]
10
11         \[[!calendar type="month" pages="blog/* and !*/Discussion"]]
12
13         \[[!calendar type="year" year="2005" pages="blog/* and !*/Discussion"]]
14
15 The calendar is essentially a fancy front end to archives of previous
16 pages, usually used for blogs. It can produce a calendar for a given month,
17 or a list of months for a given year.
18
19 The month format calendar simply links to any page posted on each
20 day of the month. The year format calendar links to archive pages, with
21 names like `archives/2007` (for all of 2007)  and `archives/2007/01`
22 (for January, 2007). For this to work, you'll need to create these archive
23 pages. They typically use [[inline]] to display or list pages created in
24 the given time frame.
25
26 ## usage
27
28 * `type` - Used to specify the type of calendar wanted. Can be one of
29   "month" or "year". The default is a month view calendar.
30 * `pages` - Specifies the [[ikiwiki/PageSpec]] of pages to link to from the
31   month calendar. Defaults to "*".
32 * `archivebase` - Configures the base of the archives hierarchy. The
33   default is "archives". Note that this default can also be overridden
34   for the whole wiki by setting `archivebase` in ikiwiki's setup file.
35 * `year` - The year for which the calendar is requested. Defaults to the
36   current year.
37 * `month` - The numeric month for which the calendar is requested, in the
38   range 1..12. Used only for the month view calendar, and defaults to the
39   current month.
40 * `week_start_day` - A number, in the range 0..6, which represents the day
41   of the week that the month calendar starts with. 0 is Sunday, 1 is Monday,
42   and so on. Defaults to 0, which is Sunday.
43 * `months_per_row` - In the annual calendar, number of months to place in
44   each row. Defaults to 3.
45
46 [[!meta robots="noindex, follow"]]