From ffcb4aeb8e392a80da7cad0f1e03a4102efb24ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 9 Mar 2020 12:04:33 +0100 Subject: Fix handling of HTML files without front matter This means that any HTML file inside /content will be treated as a regular file. If you want it processes with shortcodes and a layout, add front matter. The defintion of an HTML file here is: * File with extension .htm or .html * With first non-whitespace character "<" that isn't a HTML comment. This is in line with the documentation. Fixes #7030 Fixes #7028 See #6789 --- deps/deps.go | 6 +----- deps/deps_test.go | 8 +------- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'deps') diff --git a/deps/deps.go b/deps/deps.go index 8f3d81632..49b056a7f 100644 --- a/deps/deps.go +++ b/deps/deps.go @@ -5,7 +5,6 @@ import ( "time" "github.com/pkg/errors" - "go.uber.org/atomic" "github.com/gohugoio/hugo/cache/filecache" "github.com/gohugoio/hugo/common/loggers" @@ -377,11 +376,8 @@ type DepsCfg struct { // BuildFlags are flags that may be turned on during a build. type BuildFlags struct { - HasLateTemplate atomic.Bool } func NewBuildFlags() BuildFlags { - return BuildFlags{ - //HasLateTemplate: atomic.NewBool(false), - } + return BuildFlags{} } diff --git a/deps/deps_test.go b/deps/deps_test.go index e2dca0ecc..a7450a41c 100644 --- a/deps/deps_test.go +++ b/deps/deps_test.go @@ -15,14 +15,8 @@ package deps import ( "testing" - - qt "github.com/frankban/quicktest" ) func TestBuildFlags(t *testing.T) { - c := qt.New(t) - var bf BuildFlags - c.Assert(bf.HasLateTemplate.Load(), qt.Equals, false) - bf.HasLateTemplate.Store(true) - c.Assert(bf.HasLateTemplate.Load(), qt.Equals, true) + } -- cgit v1.2.3