We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See https://discourse.gohugo.io/t/duplicate-target-paths/52788/5
The text was updated successfully, but these errors were encountered:
FYI...
With only 1 file (foo.txt) in the assets directory, this template...
foo.txt
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 }}
...triggers this warning:
WARN Duplicate target paths: /foo.txt (4)
But this template doesn't trigger any warnings:
A: {{ (resources.Get "foo.txt").RelPermalink }} B: {{ (resources.Get "foo.txt").RelPermalink }} C: {{ (resources.Get "foo.txt").RelPermalink }} D: {{ (resources.Get "foo.txt").RelPermalink }}
I tried to create an integration test but I couldn't trigger the warning.
func 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)") }
Sorry, something went wrong.
bep
No branches or pull requests
See https://discourse.gohugo.io/t/duplicate-target-paths/52788/5
The text was updated successfully, but these errors were encountered: