summaryrefslogtreecommitdiffstats
path: root/hugolib/params_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/params_test.go')
-rw-r--r--hugolib/params_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/hugolib/params_test.go b/hugolib/params_test.go
index f80f14035..6f890b43b 100644
--- a/hugolib/params_test.go
+++ b/hugolib/params_test.go
@@ -133,6 +133,28 @@ RegularPages: {{ range site.RegularPages }}{{ .Path }}|{{ .RelPermalink }}|{{ .T
)
}
+func TestFrontMatterTitleOverrideWarn(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+baseURL = "https://example.org/"
+disableKinds = ["taxonomy", "term"]
+-- content/p1.md --
+---
+title: "My title"
+params:
+ title: "My title from params"
+---
+
+
+`
+
+ b := Test(t, files, TestOptWarn())
+
+ b.AssertLogContains("ARN Hugo front matter key \"title\" is overridden in params section", "You can suppress this warning")
+}
+
func TestFrontMatterParamsLangNoCascade(t *testing.T) {
t.Parallel()