summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hugolib/hugo_sites_build.go2
-rw-r--r--hugolib/rebuild_test.go18
2 files changed, 20 insertions, 0 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index 382b1eed0..ddc712a2d 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -792,6 +792,8 @@ func (h *HugoSites) processPartial(ctx context.Context, l logg.LevelLogger, conf
// 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()))
}
diff --git a/hugolib/rebuild_test.go b/hugolib/rebuild_test.go
index 98a8d0949..f3b10cf18 100644
--- a/hugolib/rebuild_test.go
+++ b/hugolib/rebuild_test.go
@@ -1472,3 +1472,21 @@ all: {{ $ab.RelPermalink }}
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()
+}