From 74b6c4e5ff5ee16f0e6b352a26c1e58b90a25dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 27 Jan 2020 12:30:31 +0100 Subject: And now finally fix the 404 templates Fixes #6795 --- hugolib/404_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'hugolib/404_test.go') diff --git a/hugolib/404_test.go b/hugolib/404_test.go index 63a766d94..a4dc667aa 100644 --- a/hugolib/404_test.go +++ b/hugolib/404_test.go @@ -35,14 +35,18 @@ func Test404WithBase(t *testing.T) { t.Parallel() b := newTestSitesBuilder(t) - b.WithSimpleConfigFile().WithTemplatesAdded("404.html", `{{ define "main" }} + b.WithSimpleConfigFile().WithTemplates("404.html", `{{ define "main" }} Page not found -{{ end }}`) +{{ end }}`, + "baseof.html", `Base: {{ block "main" . }}{{ end }}`).WithContent("page.md", ``) + b.Build(BuildCfg{}) // Note: We currently have only 1 404 page. One might think that we should have // multiple, to follow the Custom Output scheme, but I don't see how that would work // right now. - b.AssertFileContent("public/404.html", `Page not found`) + b.AssertFileContent("public/404.html", ` +Base: +Page not found`) } -- cgit v1.2.3