mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
tpl/urls: Make urlize return a string
Like it did in 0.20.
This commit is contained in:
parent
a40d1f6ed2
commit
3dd949d956
1 changed files with 2 additions and 2 deletions
|
@ -54,12 +54,12 @@ func (ns *Namespace) RelURL(a interface{}) (template.HTML, error) {
|
|||
return template.HTML(ns.deps.PathSpec.RelURL(s, false)), nil
|
||||
}
|
||||
|
||||
func (ns *Namespace) URLize(a interface{}) (template.URL, error) {
|
||||
func (ns *Namespace) URLize(a interface{}) (string, error) {
|
||||
s, err := cast.ToStringE(a)
|
||||
if err != nil {
|
||||
return "", nil
|
||||
}
|
||||
return template.URL(ns.deps.PathSpec.URLize(s)), nil
|
||||
return ns.deps.PathSpec.URLize(s), nil
|
||||
}
|
||||
|
||||
type reflinker interface {
|
||||
|
|
Loading…
Reference in a new issue