Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAnton Ageev <antage@gmail.com>2014-02-02 18:18:01 +0400
committerspf13 <steve.francia@gmail.com>2014-02-05 20:49:57 +0400
commit11ca84f8cb19f01b7977b549e63e0ce0d126054e (patch)
tree2b6c1d554b0abeef47f08edaad49cbca5d4d80ba /target
parent24ffe04360f337c7b189df52b9a7c22683ef395e (diff)
Add unicode support for aliases, indexes, urlize template filter.
Now aliases and indexes are not restricted ASCII letters and can include any unicode letters.
Diffstat (limited to 'target')
-rw-r--r--target/alias_test.go1
-rw-r--r--target/htmlredirect.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/target/alias_test.go b/target/alias_test.go
index 7f5db79af..d19349f23 100644
--- a/target/alias_test.go
+++ b/target/alias_test.go
@@ -20,6 +20,7 @@ func TestHTMLRedirectAlias(t *testing.T) {
{"alias 3.html", "alias-3.html"},
{"alias4.html", "alias4.html"},
{"/alias 5.html", "/alias-5.html"},
+ {"/трям.html", "/трям.html"},
}
for _, test := range tests {
diff --git a/target/htmlredirect.go b/target/htmlredirect.go
index 53e900f91..55f4896e1 100644
--- a/target/htmlredirect.go
+++ b/target/htmlredirect.go
@@ -39,7 +39,7 @@ func (h *HTMLRedirectAlias) Translate(alias string) (aliasPath string, err error
} else if !strings.HasSuffix(alias, ".html") {
alias = alias + "/index.html"
}
- return path.Join(h.PublishDir, helpers.Urlize(alias)), nil
+ return path.Join(h.PublishDir, helpers.MakePath(alias)), nil
}
type AliasNode struct {