mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
@@ -92,3 +92,24 @@ Not found.
|
|||||||
|
|
||||||
b.AssertFileContent("public/404.html", `Not found. Updated.`)
|
b.AssertFileContent("public/404.html", `Not found. Updated.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test404Panic14283(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
|
files := `
|
||||||
|
-- hugo.toml --
|
||||||
|
baseURL = "http://example.com/"
|
||||||
|
-- layouts/all.html --
|
||||||
|
All. {{ .Kind }}. {{ .Title }}|
|
||||||
|
-- content/404/_index.md --
|
||||||
|
---
|
||||||
|
title: "404 branch"
|
||||||
|
---
|
||||||
|
This is the 404 branch.
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
b := Test(t, files) // panic.
|
||||||
|
|
||||||
|
b.AssertFileContent("public/404/index.html", "All. section. 404 branch|")
|
||||||
|
}
|
||||||
|
|||||||
@@ -198,6 +198,7 @@ func (a *allPagesAssembler) doCreatePages(prefix string, depth int) error {
|
|||||||
p := newHomePageMetaSource()
|
p := newHomePageMetaSource()
|
||||||
treePages.InsertRaw(p.pathInfo.Base(), p)
|
treePages.InsertRaw(p.pathInfo.Base(), p)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getCascades := func(wctx *doctree.WalkContext[contentNode], s string) *page.PageMatcherParamsConfigs {
|
getCascades := func(wctx *doctree.WalkContext[contentNode], s string) *page.PageMatcherParamsConfigs {
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ func (r *NodeShiftTreeWalker[T]) toT(tree *NodeShiftTree[T], v T) (T, bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *NodeShiftTree[T]) Has(s string) bool {
|
func (r *NodeShiftTree[T]) Has(s string) bool {
|
||||||
_, ok := r.get(s)
|
_, ok := r.GetRaw(s)
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user