+++ title = "Table of Contents" weight = 60 +++ Each page/section will automatically generate a table of contents for itself based on the headers present. It is available in the template through the `toc` variable. You can view the [template variables](@/documentation/templates/pages-sections.md#table-of-contents) documentation for information on its structure. Here is an example of using that field to render a 2-level table of contents: ```jinja2