shithub: hugo

Download patch

ref: 8bfd3a54a4142c397cab69bfa9699e5b5db9b40b
parent: bb533ca5e1c778c95ed7014eab99c8cc1bd4c85e
author: Bjørn Erik Pedersen <[email protected]>
date: Thu Mar 28 05:45:25 EDT 2019

hugolib: Add a simple test for jsonify of Site

Closes #5780

--- a/hugolib/siteJSONEncode_test.go
+++ b/hugolib/siteJSONEncode_test.go
@@ -23,7 +23,9 @@
 func TestEncodePage(t *testing.T) {
 	t.Parallel()
 
-	templ := `{{ index .Site.RegularPages 0 | jsonify }}`
+	templ := `Page: |{{ index .Site.RegularPages 0 | jsonify }}|
+Site: {{ site | jsonify }}
+`
 
 	b := newTestSitesBuilder(t)
 	b.WithSimpleConfigFile().WithTemplatesAdded("index.html", templ)