mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-01 22:42:45 +02:00
@@ -21,7 +21,6 @@ import (
|
||||
|
||||
bp "github.com/spf13/hugo/bufferpool"
|
||||
"github.com/spf13/hugo/deps"
|
||||
"github.com/spf13/hugo/tpl/images"
|
||||
"github.com/spf13/hugo/tpl/inflect"
|
||||
"github.com/spf13/hugo/tpl/os"
|
||||
"github.com/spf13/hugo/tpl/safe"
|
||||
@@ -36,7 +35,6 @@ type templateFuncster struct {
|
||||
cachedPartials partialCache
|
||||
|
||||
// Namespaces
|
||||
images *images.Namespace
|
||||
inflect *inflect.Namespace
|
||||
os *os.Namespace
|
||||
safe *safe.Namespace
|
||||
@@ -53,7 +51,6 @@ func newTemplateFuncster(deps *deps.Deps) *templateFuncster {
|
||||
cachedPartials: partialCache{p: make(map[string]interface{})},
|
||||
|
||||
// Namespaces
|
||||
images: images.New(deps),
|
||||
inflect: inflect.New(),
|
||||
os: os.New(deps),
|
||||
safe: safe.New(),
|
||||
|
@@ -29,6 +29,7 @@ import (
|
||||
_ "github.com/spf13/hugo/tpl/crypto"
|
||||
_ "github.com/spf13/hugo/tpl/data"
|
||||
_ "github.com/spf13/hugo/tpl/encoding"
|
||||
_ "github.com/spf13/hugo/tpl/images"
|
||||
_ "github.com/spf13/hugo/tpl/lang"
|
||||
_ "github.com/spf13/hugo/tpl/math"
|
||||
_ "github.com/spf13/hugo/tpl/strings"
|
||||
@@ -85,7 +86,6 @@ func (t *templateFuncster) partialCached(name string, context interface{}, varia
|
||||
func (t *templateFuncster) initFuncMap() {
|
||||
funcMap := template.FuncMap{
|
||||
// Namespaces
|
||||
"images": t.images.Namespace,
|
||||
"inflect": t.inflect.Namespace,
|
||||
"os": t.os.Namespace,
|
||||
"safe": t.safe.Namespace,
|
||||
@@ -102,7 +102,6 @@ func (t *templateFuncster) initFuncMap() {
|
||||
"htmlEscape": t.transform.HTMLEscape,
|
||||
"htmlUnescape": t.transform.HTMLUnescape,
|
||||
"humanize": t.inflect.Humanize,
|
||||
"imageConfig": t.images.Config,
|
||||
"int": func(v interface{}) (int, error) { return cast.ToIntE(v) },
|
||||
"markdownify": t.transform.Markdownify,
|
||||
"now": t.time.Now,
|
||||
|
Reference in New Issue
Block a user