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

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

Open yccheok opened this issue 6 years ago • 3 comments

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 avatar Aug 03 '17 09:08 yccheok

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.

yccheok avatar Aug 03 '17 17:08 yccheok

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 avatar Nov 07 '17 11:11 hudecof

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

hudecof avatar Nov 07 '17 11:11 hudecof