digitalcraftsman / hugo-material-docs

Port of Martin Donath's mkdocs-material theme to Hugo
MIT License
706 stars 186 forks source link

Nested menu ==> parent index page not linked #31

Open kamar535 opened 8 years ago

kamar535 commented 8 years ago

I have the following in my config.toml.

[[menu.main]]
  name = "Section"
  url  = "section/"

An the following content:

$> tree content/section/
content/section/
├── index.md

In the menu I now see a link to the section index.md page as expected.

After adding the following to config.toml:

[[menu.main]]
  name = "Section"
  url  = "section/"

[[menu.main]]
  name = "Sub page 1"
  url  = "section/page-1"
  parent = "Section"

[[menu.main]]
  name = "Sub page 2"
  url  = "section/page-2"
  parent = "Section"

, and the following content:

$> tree content/section/
content/section/
├── index.md
├── page-1.md
└── page-2.md

Now the sub pages are inserted, indented and linked under Section in the menu. But, the parent Section doesn't link to the section index.md page anymore.

How can I make a nested menu and still have parent elements link to pages?

tblom commented 7 years ago

This seems to be what we're discussing in issue #70 as well.