mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
Fix same resource file published more than once
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
This commit is contained in:
parent
ec0caaec7c
commit
77824d704c
4 changed files with 48 additions and 27 deletions
15
testscripts/commands/hugo__path-warnings_issue13164.txt
Normal file
15
testscripts/commands/hugo__path-warnings_issue13164.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
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 }}
|
Loading…
Add table
Add a link
Reference in a new issue