mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
tpl/urls: Add anchorize template func
This commit is contained in:
@@ -59,6 +59,13 @@ func init() {
|
||||
[][2]string{},
|
||||
)
|
||||
|
||||
ns.AddMethodMapping(ctx.Anchorize,
|
||||
[]string{"anchorize"},
|
||||
[][2]string{
|
||||
{`{{ "This is a title" | anchorize }}`, `this-is-a-title`},
|
||||
},
|
||||
)
|
||||
|
||||
return ns
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user