Fix false path warnings with resources.PostProcess

Fixes #7735
This commit is contained in:
Bjørn Erik Pedersen
2023-06-27 09:16:42 +02:00
parent 12e4c4d5dc
commit fa0e16f4c7
4 changed files with 61 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
hugo --printPathWarnings
! stdout 'Duplicate'
-- hugo.toml --
-- assets/css/styles.css --
body {
background-color: #000;
}
-- content/p1.md --
-- content/p2.md --
-- content/p3.md --
-- layouts/index.html --
Home.
-- layouts/_default/single.html --
{{ $css := resources.Get "css/styles.css" }}
{{ $css := $css | minify | fingerprint | resources.PostProcess }}
CSS: {{ $css.RelPermalink }}
{{ .Title }}

View File

@@ -0,0 +1,26 @@
hugo --printPathWarnings
stdout 'Duplicate'
-- hugo.toml --
-- assets/css/styles.css --
body {
background-color: #000;
}
-- content/p1.md --
---
url: /p1/
---
-- content/p2.md --
---
url: /p1/
---
-- content/p3.md --
---
url: /p1/
---
-- layouts/index.html --
Home.
-- layouts/_default/single.html --
Single.