aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/pagesfromdata
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-05-30 14:58:05 +0200
committerBjørn Erik Pedersen <[email protected]>2024-05-30 16:22:26 +0200
commit1464091ad639aa8d3a3793515a9661eaf801cfcb (patch)
tree651010ebafde1d5aabb3a476ebd692806568497c /hugolib/pagesfromdata
parent2c88e454d8befa243a0e9e55ff92821d96865151 (diff)
downloadhugo-1464091ad639aa8d3a3793515a9661eaf801cfcb.tar.gz
hugo-1464091ad639aa8d3a3793515a9661eaf801cfcb.zip
content adapter: Fix server crash on partial edit
Fixes #12538
Diffstat (limited to 'hugolib/pagesfromdata')
-rw-r--r--hugolib/pagesfromdata/pagesfromgotmpl_integration_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/hugolib/pagesfromdata/pagesfromgotmpl_integration_test.go b/hugolib/pagesfromdata/pagesfromgotmpl_integration_test.go
index 3a37c233b..cbb2da75c 100644
--- a/hugolib/pagesfromdata/pagesfromgotmpl_integration_test.go
+++ b/hugolib/pagesfromdata/pagesfromgotmpl_integration_test.go
@@ -38,7 +38,11 @@ draft: false
-- layouts/partials/get-value.html --
{{ $val := "p1" }}
{{ return $val }}
+-- layouts/_default/baseof.html --
+Baseof:
+{{ block "main" . }}{{ end }}
-- layouts/_default/single.html --
+{{ define "main" }}
Single: {{ .Title }}|{{ .Content }}|Params: {{ .Params.param1 }}|Path: {{ .Path }}|
Dates: Date: {{ .Date.Format "2006-01-02" }}|Lastmod: {{ .Lastmod.Format "2006-01-02" }}|PublishDate: {{ .PublishDate.Format "2006-01-02" }}|ExpiryDate: {{ .ExpiryDate.Format "2006-01-02" }}|
Len Resources: {{ .Resources | len }}
@@ -49,6 +53,7 @@ Featured Image: {{ .RelPermalink }}|{{ .Name }}|
Resized Featured Image: {{ .RelPermalink }}|{{ .Width }}|
{{ end}}
{{ end }}
+{{ end }}
-- layouts/_default/list.html --
List: {{ .Title }}|{{ .Content }}|
RegularPagesRecursive: {{ range .RegularPagesRecursive }}{{ .Title }}:{{ .Path }}|{{ end }}$