-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-section pages added to main menu when using sectionPagesMenu #12399
Comments
The erroneous "duplicate menu entry with identifier" warning in v0.123.0 was triggered by The remaining problem (either resulting from or exposed by #12349) is that
Failing test case: func TestFoo(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['rss','sitemap','taxonomy','term']
capitalizeListTitles = false
pluralizeListTitles = false
sectionPagesMenu = 'main'
-- content/p1.md --
---
title: p1
---
-- content/s1/p2.md --
---
title: p2
menus: main
---
-- content/s1/p3.md --
---
title: p3
---
-- layouts/_default/list.html --
{{ range site.Menus.main }}<a href="{{ .URL }}">{{ .Name }}</a>{{ end }}
-- layouts/_default/single.html --
{{ .Title }}
`
b := hugolib.Test(t, files)
b.AssertFileExists("public/index.html", true)
b.AssertFileContent("public/index.html", `<a href="/p2/">p2</a><a href="/s1/">s1</a>`)
} |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?First found in hugo_0.123.0_linux-amd64.tar.gz
Does this issue reproduce with the latest release?
Yes.
Starting in v0.123.0, some warnings were printed:
Both pages are rendered using their respective titles/names/paths/weights, however there is an additional entry created at the end of the menu which duplicates the contact.md page. In the most recent release, this warning is removed, but the duplicate entry is still created.
The source I am working on is https://github.com/recoverysource/aamod/
The text was updated successfully, but these errors were encountered: