For Clear Linux* OS documentation that has three or more sections, use the contents:: directive as shown in the example below. This directive automatically captures the headings (and subheadings if used) as specified in the value given after :depth:. Adding this directive to longer documents allows users to quickly navigate to the desired section.

.. contents:: :local:
       :depth: 2

Note

Assure that you add :local: as the value. For more resources on this directive, visit the reStruturedText Directives

EXAMPLE: