-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Section page resource not published if resource filename partially matches content file name #12198
Comments
@mwegnr Thanks for this. Note that resources even beginning with the same name are excluded (e.g., news/test-foo.ext). |
Content
Expected (v0.122.0)
Actual (v0.123.7)
Failing test casetest casefunc TestFoo(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['home','rss','sitemap','taxonomy','term']
-- content/s1/p1.md --
---
title: p1
---
-- content/s1/foo.txt --
foo.txt
-- content/s1/p1.txt --
p1.txt
-- content/s1/p1-foo.txt --
p1-foo.txt
-- layouts/_default/list.html --
{{.Title }}|
-- layouts/_default/single.html --
{{.Title }}|
`
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: t,
TxtarString: files,
},
)
b.Build()
b.AssertFileExists("public/s1/index.html", true)
b.AssertFileExists("public/s1/foo.txt", true)
b.AssertFileExists("public/s1/p1.txt", true) // failing test
b.AssertFileExists("public/s1/p1-foo.txt", true) // failing test
b.AssertFileExists("public/s1/p1/index.html", true)
} |
bep
added a commit
to bep/hugo
that referenced
this issue
Mar 7, 2024
…y matches content file name Fixes gohugoio#12198
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes, reproducible from 0.123.0 to latest (0.123.7)
Problem Description
When a page-file has the same basename as the resources in the folder, the resources do not get included in the page build with
hugo
. This was different in hugo 0.122.0.This folder structure
results in this page structure
When using 0.122.0, the page structure is
Minimal Example Project
Project with the example structure above can be found here: https://github.com/mwegnr/hugo-resource-copy
The text was updated successfully, but these errors were encountered: