From 1464091ad639aa8d3a3793515a9661eaf801cfcb Mon Sep 17 00:00:00 2001 From: Bjørn Erik Pedersen Date: Thu, 30 May 2024 14:58:05 +0200 Subject: content adapter: Fix server crash on partial edit Fixes #12538 --- hugolib/pagesfromdata/pagesfromgotmpl_integration_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hugolib/pagesfromdata') 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 }}$ -- cgit v1.2.3