#52, Allow to set max showed levels of ToC. e.g. BookToC=3

This commit is contained in:
Alex Shpak
2019-05-27 16:48:23 +02:00
parent 6d64cc708e
commit e452a7beda
9 changed files with 33 additions and 16 deletions
+10 -5
View File
@@ -15,6 +15,10 @@
- [Shortcodes](#shortcodes)
- [Contributing](#contributing)
## Breaking changes
> ⚠️ At the moment theme is under development, breaking changes might happen.
## Features
- Clean simple design
@@ -123,9 +127,10 @@ enableGitInfo = true
disableKinds = ['taxonomy', 'taxonomyTerm']
[params]
# (Optional, default true) Show or hide table of contents globally
# (Optional, default 6) Set how many table of contents levels to be showed on page.
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
# You can also specify this parameter per page in front matter
BookShowToC = true
BookToC = 3
# (Optional, default none) Set leaf bundle to render as side menu
# When not specified file structure and weights will be used
@@ -174,8 +179,8 @@ bookFlatSection = true
# (Optional) Set true to hide page or section from side menu (if BookMenuBundle not set)
bookHidden = true
# (Optional) Set true to hide table of contents, overrides global value
bookShowToC = false
# (Optional) Set how many levels of ToC to show. use 'false' to hide ToC completely
bookToC = 3
```
### Partials
@@ -235,7 +240,7 @@ Organize text in 2 or more columns to use space efficiently.
# Mid Content Lorem markdownum insigne... <--->
<!-- magic sparator, between columns -->
# Right Content Lorem markdownum insigne...
# Right Content Lorem markdownum insigne...
{{< /columns >}}
```