shithub: hugo

Download patch

ref: 3dd949d956390478da83b44488b0a5f4a9ebeb86
parent: a40d1f6ed2aedddc99725658993258cd557640ed
author: Bjørn Erik Pedersen <[email protected]>
date: Tue May 2 19:46:36 EDT 2017

tpl/urls: Make urlize return a string

Like it did in 0.20.

--- a/tpl/urls/urls.go
+++ b/tpl/urls/urls.go
@@ -54,12 +54,12 @@
 	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 {