tpl/images: Make it a package that stands on its own

See #3042
This commit is contained in:
Bjørn Erik Pedersen
2017-04-30 22:36:26 +02:00
parent 9aee8ace4e
commit a432c90aee
3 changed files with 44 additions and 5 deletions

View File

@@ -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,