mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Adding correct canonical link to alias pages
This commit is contained in:
parent
d5518c0966
commit
ac26de205e
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue