Comments (2)
The erroneous "duplicate menu entry with identifier" warning in v0.123.0 was triggered by sectionPagesMenu = 'main'
in the site configuration. The erroneous warning was removed with #12349 in v0.125.0.
The remaining problem (either resulting from or exposed by #12349) is that sectionPagesMenu = 'main'
is adding non-section pages (e.g., content/contact.md) to the menu.
git clone --single-branch -b hugo-github-issue-12399 https://github.com/jmooring/hugo-testing hugo-github-issue-12399
cd hugo-github-issue-12399
hugo server
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>`)
}
from hugo.
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.
from hugo.
Related Issues (20)
- Hugo server crash when saving a partial used in content adapter HOT 7
- Command "hugo mod get -u" does not accept global --source flag HOT 3
- Enhance Documentation with Multilingual README and Comprehensive FAQ.MD file HOT 1
- resources/images: Poor overlay quality when background image is an indexed (not true color) PNG
- content adapter: Shortcode not rendered unless preceded by character
- Deprecate the --source flag
- Hugo attempts to download module from GitHub even after it has been downloaded to _vendors folder HOT 8
- content adapter: Handle <!--more--> separator in content.value
- Resource Permalink returns incorrect base URL with multihost site HOT 3
- content adapter: Site.GetPage without fully qualified path cannot find page
- multihost: Console displays wrong language key when running hugo server HOT 1
- Adding/removing hyphen from tag in front matter isn't detected by hugo server HOT 1
- Error when JSON fenced code block contains shortcode call HOT 4
- content adapter: Adding new pages in server mode does not refresh .RegularPagesRecursive etc.
- Option to not generate aliases for first page of pagination pages HOT 4
- Support more recent targets with js.Build / esbuild
- Let PAGES.GroupByParam return nil instead of error HOT 1
- Not generating the correct Chroma styles for syntax highlighting themes HOT 1
- Module menus not respected
- unable to import netlify environment variable in assets/js/custom.js file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo.