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
15 lines
460 B
Text
15 lines
460 B
Text
hugo --printPathWarnings
|
|
|
|
! stderr 'Duplicate target paths'
|
|
|
|
-- hugo.toml --
|
|
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
|
|
-- 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 }}
|