Table of contents widget
Create a table of contents
When editing a document, place your cursor where you want the table of contents to appear. Click "Insert widget" in the top menu. Choose "Table of Contents".
The widget lets you specify a depth. The number you enter corresponds to the heading numbers you apply to your titles. So choosing 3, will include headers 1, 2 and 3 into the table of contents.