Compare commits

...

4 commits

Author SHA1 Message Date
hugoreleaser 39a4a3cf67 releaser: Bump versions for release of 0.111.1
[ci skip]
2023-03-02 10:08:26 +00:00
Bjørn Erik Pedersen 52f339dada
Merge branch 'release-0.111.0' 2023-03-02 11:05:24 +01:00
Bjørn Erik Pedersen eef23a7f27 Fix "page" not defined
Fixes #10774
2023-03-02 10:39:44 +01:00
hugoreleaser 18cf75805c releaser: Prepare repository for 0.112.0-DEV
[ci skip]
2023-03-01 21:08:27 +00:00
4 changed files with 31 additions and 3 deletions

View file

@ -18,6 +18,6 @@ package hugo
var CurrentVersion = Version{
Major: 0,
Minor: 111,
PatchLevel: 0,
PatchLevel: 1,
Suffix: "",
}

View file

@ -1,7 +1,8 @@
# Release env.
# These will be replaced by script before release.
HUGORELEASER_TAG=v0.110.0
HUGORELEASER_COMMITISH=e32a493b7826d02763c3b79623952e625402b168
HUGORELEASER_TAG=v0.111.0
HUGORELEASER_COMMITISH=3fa8bb8318114cd69315eadd35bda169e6a8ca4b

View file

@ -83,3 +83,29 @@ post/doesnotexist.html: false
`)
}
// See #10774
func TestPageFunctionExists(t *testing.T) {
t.Parallel()
files := `
-- config.toml --
baseURL = 'http://example.com/'
-- layouts/index.html --
Home: {{ page.IsHome }}
`
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: t,
TxtarString: files,
},
).Build()
b.AssertFileContent("public/index.html", `
Home: true
`)
}

View file

@ -50,6 +50,7 @@ import (
_ "github.com/gohugoio/hugo/tpl/math"
_ "github.com/gohugoio/hugo/tpl/openapi/openapi3"
_ "github.com/gohugoio/hugo/tpl/os"
_ "github.com/gohugoio/hugo/tpl/page"
_ "github.com/gohugoio/hugo/tpl/partials"
_ "github.com/gohugoio/hugo/tpl/path"
_ "github.com/gohugoio/hugo/tpl/reflect"