]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/toc.mdwn
toc: Add startlevel parameter. (kerravonsen)
[ikiwiki.git] / doc / ikiwiki / directive / toc.mdwn
1 The `toc` directive is supplied by the [[!iki plugins/toc desc=toc]] plugin.
2
3 Add a table of contents to a page:
4
5         \[[!toc ]]
6
7 The table of contents will be automatically generated based on the
8 headers of the page. By default only the largest headers present on the
9 page will be shown; to control how many levels of headers are shown, use
10 the `levels` parameter:
11
12         \[[!toc levels=2]]
13
14 The toc directive will take the level of the first header as the topmost
15 level, even if there are higher levels seen later in the file.
16
17 To create a table of contents that only shows headers starting with a given
18 level, use the `startlevel` parameter. For example, to show only h2 and
19 smaller headers:
20
21         \[[!toc startlevel=2]]
22
23 The table of contents will be created as an ordered list. If you want
24 an unordered list instead, you can change the list-style in your local
25 style sheet.
26
27 [[!meta robots="noindex, follow"]]