Adding correct canonical link to alias pages

This commit is contained in:
spf13 2013-08-10 15:41:10 +01:00
parent d5518c0966
commit ac26de205e

View file

@ -174,7 +174,7 @@ func (s *Site) loadTemplates() {
}
func (s *Site) primeTemplates() {
alias := "<!DOCTYPE html>\n <html>\n <head>\n <link rel=\"canonical\" href=\"{{ . }}\"/>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n <meta http-equiv=\"refresh\" content=\"0;url={{ .Permalink }}\" />\n </head>\n </html>"
alias := "<!DOCTYPE html>\n <html>\n <head>\n <link rel=\"canonical\" href=\"{{ .Permalink }}\"/>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n <meta http-equiv=\"refresh\" content=\"0;url={{ .Permalink }}\" />\n </head>\n </html>"
t := s.Tmpl.New("alias")
template.Must(t.Parse(alias))