diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-04-30 23:33:14 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-01 15:13:41 +0200 |
commit | 4714085a10835b9f4e8d4f699dc94e3120d8067e (patch) | |
tree | 15f746c49b9c37a6be11aa46deffb28739c05bec /tpl/tplimpl/template_funcs.go | |
parent | 55f90a3a0dad6eb9fffd49605946fc88ab4134ad (diff) |
tpl/urls: Make it a package that stands on its own
See #3042
Diffstat (limited to 'tpl/tplimpl/template_funcs.go')
-rw-r--r-- | tpl/tplimpl/template_funcs.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tpl/tplimpl/template_funcs.go b/tpl/tplimpl/template_funcs.go index e5303a8d7..d1a2dd73a 100644 --- a/tpl/tplimpl/template_funcs.go +++ b/tpl/tplimpl/template_funcs.go @@ -38,6 +38,7 @@ import ( _ "github.com/spf13/hugo/tpl/strings" _ "github.com/spf13/hugo/tpl/time" _ "github.com/spf13/hugo/tpl/transform" + _ "github.com/spf13/hugo/tpl/urls" ) // Get retrieves partial output from the cache based upon the partial name. @@ -92,20 +93,12 @@ func (t *templateFuncster) initFuncMap() { funcMap := template.FuncMap{ // Namespaces //"time": t.time.Namespace, - "urls": t.urls.Namespace, - - "absURL": t.urls.AbsURL, - "absLangURL": t.urls.AbsLangURL, "int": func(v interface{}) (int, error) { return cast.ToIntE(v) }, "partial": t.partial, "partialCached": t.partialCached, "print": fmt.Sprint, "printf": fmt.Sprintf, "println": fmt.Sprintln, - "ref": t.urls.Ref, - "relURL": t.urls.RelURL, - "relLangURL": t.urls.RelLangURL, - "relref": t.urls.RelRef, "string": func(v interface{}) (string, error) { return cast.ToStringE(v) }, "urlize": t.PathSpec.URLize, } |