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:
authorMarvin Pinto <git@pinto.im>2016-03-07 23:05:51 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-06-09 16:57:35 +0300
commit5d3aabcb32f33715eddb378f12541c7c412ee261 (patch)
treea6f4fa3e17a594da2ba715822b7e2a818952f131 /target
parent75deb923d9feb8a2d92b2ed25af7426af6e7cc21 (diff)
Update the alias generated HTML files to conform to the W3C HTML spec
- W3C recommends that there be a [whitespace character][1] between the `;` and the `url=` portions. - W3C also recommends that there be a [title][2] child in the `head` element [1]: https://www.w3.org/TR/html-markup/meta.http-equiv.refresh.html [2]: https://www.w3.org/TR/html-markup/head.html Closes #1933
Diffstat (limited to 'target')
-rw-r--r--target/htmlredirect.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/htmlredirect.go b/target/htmlredirect.go
index 1e2abec40..d8eac943c 100644
--- a/target/htmlredirect.go
+++ b/target/htmlredirect.go
@@ -26,8 +26,8 @@ import (
jww "github.com/spf13/jwalterweatherman"
)
-const alias = "<!DOCTYPE html><html><head><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0;url={{ .Permalink }}\" /></head></html>"
-const aliasXHtml = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0;url={{ .Permalink }}\" /></head></html>"
+const alias = "<!DOCTYPE html><html><head><title>{{ .Permalink }}</title><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0; url={{ .Permalink }}\" /></head></html>"
+const aliasXHtml = "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>{{ .Permalink }}</title><link rel=\"canonical\" href=\"{{ .Permalink }}\"/><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"refresh\" content=\"0; url={{ .Permalink }}\" /></head></html>"
var defaultAliasTemplates *template.Template