aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/page_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-11-21 21:59:38 +0100
committerBjørn Erik Pedersen <[email protected]>2019-11-22 18:41:50 +0100
commita3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f (patch)
tree06cf1f647ae026b4fb3053c85370c2b203c7a089 /hugolib/page_test.go
parentcd07e6d57b158a76f812e8c4c9567dbc84f57939 (diff)
downloadhugo-a3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f.tar.gz
hugo-a3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f.zip
Fix Params case handling in the index, sort and where func
This means that you can now do: ``` {{ range where .Site.Pages "Params.MYPARAM" "foo" }} ```
Diffstat (limited to 'hugolib/page_test.go')
-rw-r--r--hugolib/page_test.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index 6b9c4193d..abceec9c6 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -1573,7 +1573,8 @@ baseURL = "https://example.org"
{{ $withStringParam := .Site.GetPage "withstringparam" }}
Author page: {{ $withParam.Param "author.name" }}
-Author page string: {{ $withStringParam.Param "author.name" }}|
+Author name page string: {{ $withStringParam.Param "author.name" }}|
+Author page string: {{ $withStringParam.Param "author" }}|
Author site config: {{ $noParam.Param "author.name" }}
`,
@@ -1603,8 +1604,10 @@ author = "Jo Nesbø"
`)
b.Build(BuildCfg{})
- b.AssertFileContent("public/index.html", "Author page: Ernest Miller Hemingway")
- b.AssertFileContent("public/index.html", "Author page string: |")
- b.AssertFileContent("public/index.html", "Author site config: Kurt Vonnegut")
+ b.AssertFileContent("public/index.html",
+ "Author page: Ernest Miller Hemingway",
+ "Author name page string: Kurt Vonnegut|",
+ "Author page string: Jo Nesbø|",
+ "Author site config: Kurt Vonnegut")
}