// It's hard to determine the exact change set of this,
// so be very coarse grained for now.
changes = append(changes, identity.GenghisKhan)
+ case files.ComponentFolderArchetypes:
+ // Ignore for now.
default:
panic(fmt.Sprintf("unknown component: %q", pathInfo.Component()))
}
b.AddFiles("assets/common/c3.css", "c3").Build()
b.AssertFileContent("public/ab.css", "abc1c2 editedc3")
}
+
+func TestRebuildEditArchetypeFile(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+disableLiveReload = true
+-- archetypes/default.md --
+---
+title: "Default"
+---
+`
+
+ b := TestRunning(t, files)
+ // Just make sure that it doesn't panic.
+ b.EditFileReplaceAll("archetypes/default.md", "Default", "Default Edited").Build()
+}