digitalcraftsman / hugo-material-docs

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

An issue w/ creating nested menu #17

Closed emzi closed 8 years ago

emzi commented 8 years ago

Hi @digitalcraftsman

It's described here how to create a nested menu. But it seems there's an issue around it:

An-image-has-NOT-been-loaded-here

cat config.toml

...
[[menu.main]]
    name   = "Home"
    url    = "/"
    weight = 0

[[menu.main]]
    name   = "Testing"
    url    = "testing/"
    weight = 10

[[menu.main]]
    name   = "Hello World!"
    url    = "aa-bb-cc/"
    weight = 20
...

content ❱ tree -L 2

.
├── aa-bb-cc
│   ├── index.md
│   ├── sub-menu-1.md
│   └── sub-menu-2.md
├── index.md
└── Testing
    └── index.md

content/aa-bb-cc ❱ head sub-menu-1.md


---
date: 2016-04-22T16:00:47+03:30
title: SubMenu 1
menu:
  main:
    parent: Hello World!
    identifier: SubMenu 1
    weight: 0

---

salaam-donya_screenshot

screenshot

gravis commented 8 years ago

I have the same issue here (with hugo 0.15)

gravis commented 8 years ago

It would be nice also to have this layout:

screenshot 2016-05-07 16 00 02

but "Installation", "Setup", etc. are actually pages of this section. Thanks

digitalcraftsman commented 8 years ago

Hello @emzi,

excuse the delay. #19 fixed this issue.

@gravis

It would be nice also to have this layout:

screenshot 2016-05-07 16 00 02

The orange line on the left is only intended for the table of contents. You can nest all pages of a section as @emzi described it in his comment above. For example, Aa-Bc-Cc becomes grey and bold in the menu. Below you see a nested list will all pages of this section.

The page SubMenu1 would also have a scrollspy if the document would contain level-2 headers (<h2>).

gravis commented 8 years ago

This is what I have:

screenshot 2016-05-18 10 44 21

the scrollspy is still working:

screenshot 2016-05-18 10 44 53

gravis commented 8 years ago

(with #19 of course)

digitalcraftsman commented 8 years ago

19 fixed the issue that I have had with the master branch.