hugo-material-docs
hugo-material-docs copied to clipboard
Level 2 headlines missing in TOC if no trailing slash in url menu field
While playing around I discovered that a trailing ´/` must be appended to the url field, otherwise the level 2 headers of the page will now show up in the TOC.
If I have the file content/test.md and the following section in config.toml:
[[menu.main]]
name = "Test"
url = "test"
, no level 2 headers in conten/test.md shows up in the TOC.
But, if I append at trailing slash to the url field:
[[menu.main]]
name = "Test"
url = "test/"
, the level 2 headers shows up.
Also, it only seems to work if there is no slash at the beginning.
This does not work:
[[menu.main]]
name = "Getting Started"
url = "/getting-started/"
But this does:
[[menu.main]]
name = "Getting Started"
url = "getting-started/"