2021-07-01 07:05:26 +00:00
---
title: ToC-Tree
---
2020-06-07 15:42:03 +00:00
The `toc-tree` shortcode will generate a Table of Content from a section file tree of your content directory. The root of the resulting ToC will be the page on which you define the shortcode.
2020-02-16 22:39:23 +00:00
2023-10-27 19:38:23 +00:00
## Usage
2022-01-06 12:58:10 +00:00
<!-- prettier - ignore - start -->
2020-02-16 22:39:23 +00:00
```tpl
2024-01-12 10:56:06 +00:00
{{< /* toc-tree [sortBy="title"] */>}}
2020-02-16 22:39:23 +00:00
```
2022-01-06 12:58:10 +00:00
<!-- prettier - ignore - end -->
2020-02-16 22:39:23 +00:00
2024-01-12 10:56:06 +00:00
### Attributes
<!-- prettier - ignore - start -->
<!-- spellchecker - disable -->
{{< propertylist name = shortcode-toc-tree sort = name order = asc > }}
<!-- spellchecker - enable -->
<!-- prettier - ignore - end -->
2020-02-16 22:39:23 +00:00
## Example
2021-01-03 21:48:34 +00:00
As said, the root will be the site on which the shortcode was used, you can see a demo including nesting in the [ToC Tree ](/toc-tree/ ) section.