digitalcraftsman / hugo-material-docs

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

Ordering of elements in the main nav menu on the left is still broken #71

Open chhh opened 7 years ago

chhh commented 7 years ago

There's:

No matter what I'm changing - the order of elements stays the same in the nav menu.

Using Hugo 0.24.1

maffelbaffel commented 7 years ago

In my case all menu items are ordered correctly but the first one (which has a weight of 0!) Have you tried setting the weight of the first menu item from 0 to 1 ? This seemed to fix the ordering for me.

chhh commented 7 years ago

I had to remove dates everywhere and set a through numbering with weights for every top level page and every sub page, then it worked. And the numbering needs to be either strictly positive or strictly negative numbers. This is all weird..

On Jul 22, 2017 14:25, "maffelbaffel" notifications@github.com wrote:

In my case all menu items are ordered correctly but the first one (which has a weight of 0!) Have you tried setting the weight of the first menu item from 0 to 1 ? This seemed to fix the ordering for me.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/digitalcraftsman/hugo-material-docs/issues/71#issuecomment-317201530, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGlfosCPKV8TByWqhTUxztyTpULr_OKks5sQj6ggaJpZM4OQRmA .

maffelbaffel commented 7 years ago

I guess its because of this line: https://github.com/gohugoio/hugo/blob/b2e3748a4e148a9624b9906bd8f34a238a54429c/hugolib/pageSort.go#L63

Dunno why they catch out these Weight == 0 cases. Edit: See https://github.com/gohugoio/hugo/issues/2673