Include the following snippet immediately after the front matter of a topic page:
{% include snippets/table-of-contents.md %}
Note: If a topic page uses HTML, this won't work and a manually created list will be required instead.
For some collections, sorting is used to control the order in which topics are presented in topic indexes, and the drop
down navigation. By default collections sort topics in file order (i.e. 1-numbers
, and-then-letters
).
Collections using topic sorting:
- Start
A sort_index
property, defined as front-matter, is used to control the order of sorted topics, with 0
being first.
Any topic without this property will be listed first, therefore all topics MUST define this property.
Example front-matter:
---
sort_index: 2
title: Foo
---
Page content
Topics use the Item type header pattern where the item type is the name of the collection each topic belongs to.
For example, a topic for an alert component in a 'components' collection would use a item_type of 'component'.
Example front matter.
---
item_type: Bar
title: Foo
---
Page content