+++ title = "Table of Contents" weight = 60 +++ Each page/section will automatically generate a table of contents for itself based on the headers generated with markdown. It is available in the template through the `page.toc` or `section.toc` variable. You can view the [template variables](@/templates/pages-sections.md#table-of-contents) documentation for information on its structure. Here is an example of using that field to render a two-level table of contents: ```jinja2 ``` While headers are neatly ordered in this example, it will work just as well with disjoint headers. Note that all existing HTML tags from the title will NOT be present in the table of contents to avoid various issues.