summaryrefslogtreecommitdiff
path: root/ikiwiki/directive/toc.mdwn
blob: bb1afa1acdc98bebff9f0cf887425d66dfd6552a (plain)

The toc directive is supplied by the [[!iki plugins/toc desc=toc]] plugin.

Add a table of contents to a page:

\[[!toc ]]

The table of contents will be automatically generated based on the headers of the page. By default only the largest headers present on the page will be shown; to control how many levels of headers are shown, use the levels parameter:

\[[!toc levels=2]]

The toc directive will take the level of the first header as the topmost level, even if there are higher levels seen later in the file.

To create a table of contents that only shows headers starting with a given level, use the startlevel parameter. For example, to show only h2 and smaller headers:

\[[!toc startlevel=2]]

The table of contents will be created as an ordered list. If you want an unordered list instead, you can change the list-style in your local style sheet.

[[!meta robots="noindex, follow"]]