digitalcraftsman / hugo-material-docs

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

The weight in menu item doesn't work as expected in example #75

Open yccheok opened 7 years ago

yccheok commented 7 years ago

According to https://themes.gohugo.io/theme/material-docs/getting-started/

The weight attribute allows you to modify the order of the menu entries. A menu entry appears further down the more weight you add.

In config.toml, the content is

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

[[menu.main]]
    name   = "Getting started"
    url    = "getting-started/"
    weight = 10

I expect Material menu item will come first, followed by Getting started as Material has less weight.

a

But, it didn't seem like the case. Am I missing anything?

Thanks.

yccheok commented 7 years ago

I realize if I changed

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

to

[[menu.main]]
    name   = "Material"
    url    = "/"
    weight = 1

It will then be the first menu item.

hudecof commented 7 years ago

using latest version of hugo this realy not works. we used older version of this templates and hugo before and it was working.

air-2:test-doc hudecof$ hugo version
Hugo Static Site Generator v0.30.2 darwin/amd64 BuildDate: 2017-11-07T11:12:28+01:00
hudecof commented 7 years ago
air-2:test-doc hudecof$ ./hugo_0.25 version
Hugo Static Site Generator v0.25 darwin/amd64 BuildDate: 2017-07-07T09:29:34+02:00

seem to be HUGO prorblem ;( not the theme