hugo-material-docs icon indicating copy to clipboard operation
hugo-material-docs copied to clipboard

Level 2 headlines missing in TOC if no trailing slash in url menu field

Open kamar535 opened this issue 9 years ago • 1 comments

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.

kamar535 avatar Sep 15 '16 12:09 kamar535

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/"

maxdeviant avatar Nov 27 '16 23:11 maxdeviant