mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Add tpl/site and tpl/hugo
This means that the current `.Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer`, `hugo.Version` etc. Fixes #5470 Fixes #5467 Fixes #5503
This commit is contained in:
@@ -1436,7 +1436,7 @@ func TestIndexPageSimpleMethods(t *testing.T) {
|
||||
{func(n *Page) bool { return n.IsNode() }},
|
||||
{func(n *Page) bool { return !n.IsPage() }},
|
||||
{func(n *Page) bool { return n.Scratch() != nil }},
|
||||
{func(n *Page) bool { return n.Hugo() != nil }},
|
||||
{func(n *Page) bool { return n.Hugo().Version != "" }},
|
||||
} {
|
||||
|
||||
n := s.newHomePage()
|
||||
|
Reference in New Issue
Block a user