summaryrefslogtreecommitdiffstats
path: root/tpl/urls/init.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-01 09:06:42 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-01 15:13:41 +0200
commit0e2260421e40c97d9d210724fb44cfdc15ea7855 (patch)
tree13a73d06a67b42584fcd20c08615418e0ec2fe1f /tpl/urls/init.go
parent4714085a10835b9f4e8d4f699dc94e3120d8067e (diff)
tpl: Fix the remaining template funcs namespace issues
See #3042
Diffstat (limited to 'tpl/urls/init.go')
-rw-r--r--tpl/urls/init.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tpl/urls/init.go b/tpl/urls/init.go
index a687704af..fb9b00a27 100644
--- a/tpl/urls/init.go
+++ b/tpl/urls/init.go
@@ -33,6 +33,7 @@ func init() {
{`{{ "http://gohugo.io/" | relURL }}`, `http://gohugo.io/`},
{`{{ "mystyle.css" | relURL }}`, `/hugo/mystyle.css`},
{`{{ mul 2 21 | relURL }}`, `/hugo/42`},
+ {`{{ "Bat Man" | urlize }}`, `bat-man`},
}
return &internal.TemplateFuncsNamespace{
@@ -45,6 +46,7 @@ func init() {
"relURL": ctx.RelURL,
"relLangURL": ctx.RelLangURL,
"relref": ctx.RelRef,
+ "urlize": ctx.URLize,
},
Examples: examples,
}