mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-25 06:10:40 +00:00
add documentation for toc and toc-tree shortcode
This commit is contained in:
parent
0019007a37
commit
d9fc5a22b5
9
exampleSite/content/shortcodes/toc-tree.md
Normal file
9
exampleSite/content/shortcodes/toc-tree.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
The toc-tree shortcode will generate a Table of Content from a section filetree of your content directory. The root of the resulting ToC will be the page on which you define the shortcode.
|
||||||
|
|
||||||
|
```tpl
|
||||||
|
{{</* toc-tree */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
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.
|
17
exampleSite/content/shortcodes/toc.md
Normal file
17
exampleSite/content/shortcodes/toc.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Simple wrapper to generate a page Table of Content from a shortcode.
|
||||||
|
|
||||||
|
```tpl
|
||||||
|
{{</* toc */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
{{< toc >}}
|
||||||
|
|
||||||
|
## Level 1
|
||||||
|
|
||||||
|
## Level 2
|
||||||
|
|
||||||
|
### Level 2.1
|
||||||
|
|
||||||
|
### Level 2.2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user