mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Make sure that unreferenced but changed bundle resources gets republished
Fixes #13748
This commit is contained in:
@@ -1946,3 +1946,23 @@ tags: ["tag1"]
|
||||
// But that is a harder problem to tackle.
|
||||
b.AssertFileContent("public/tags/index.html", "All. Tag1|Tag2|")
|
||||
}
|
||||
|
||||
func TestRebuildEditNonReferencedResourceIssue13748(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.com"
|
||||
disableLiveReload = true
|
||||
-- content/mybundle/index.md --
|
||||
-- content/mybundle/resource.txt --
|
||||
This is a resource file.
|
||||
-- layouts/all.html --
|
||||
All.
|
||||
`
|
||||
b := TestRunning(t, files)
|
||||
|
||||
b.AssertFileContent("public/mybundle/resource.txt", "This is a resource file.")
|
||||
b.EditFileReplaceAll("content/mybundle/resource.txt", "This is a resource file.", "This is an edited resource file.").Build()
|
||||
b.AssertFileContent("public/mybundle/resource.txt", "This is an edited resource file.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user