-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
False path warning / resources possibly written twice to /public in some cases #13164
Comments
FYI... With only 1 file (
...triggers this warning:
But this template doesn't trigger any warnings:
I tried to create an integration test but I couldn't trigger the warning. integration testfunc TestFoo(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
printPathWarnings = true
-- assets/foo.txt --
foo
-- layouts/index.html --
A: {{ (resources.Get "foo.txt").RelPermalink }}
B: {{ (resources.GetMatch "foo.txt").RelPermalink }}
C: {{ (index (resources.Match "foo.txt") 0).RelPermalink }}
D: {{ (index (resources.ByType "text") 0).RelPermalink }}
-- layouts/unused/single.html --
{{ .Title }}
`
b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html",
"A: /foo.txt",
"B: /foo.txt",
"C: /foo.txt",
"D: /foo.txt",
)
b.AssertLogContains("WARN Duplicate target paths: /foo.txt (4)")
} |
bep
added a commit
to bep/hugo
that referenced
this issue
Dec 26, 2024
This may still happen, though, in low memory situations or very big sites, but I'm not sure it's worth spending time on fixing that. Writing the same file more than once isn't harmful, the negative effect is the false path warning. We may find a way to detect that situtation if this becomes a real problem. Fixes gohugoio#13164
bep
added a commit
to bep/hugo
that referenced
this issue
Dec 26, 2024
This may still happen, though, in low memory situations or very big sites, but I'm not sure it's worth spending time on fixing that. Writing the same file more than once isn't harmful, the negative effect is the false path warning. We may find a way to detect that situation if this becomes a real problem. Fixes gohugoio#13164
bep
added a commit
to bep/hugo
that referenced
this issue
Dec 26, 2024
This may still happen, though, in low memory situations or very big sites, but I'm not sure it's worth spending time on fixing that. Writing the same file more than once isn't harmful, the negative effect is the false path warning. We may find a way to detect that situation if this becomes a real problem. Fixes gohugoio#13164
bep
added a commit
that referenced
this issue
Dec 27, 2024
This may still happen, though, in low memory situations or very big sites, but I'm not sure it's worth spending time on fixing that. Writing the same file more than once isn't harmful, the negative effect is the false path warning. We may find a way to detect that situation if this becomes a real problem. Fixes #13164
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://discourse.gohugo.io/t/duplicate-target-paths/52788/5
The text was updated successfully, but these errors were encountered: