all repos — homestead @ 6c5baa8ed6c4ee579e2dc80360a2211c07129326

Code for my website

Set canonical links

Alan Pearce
commit

6c5baa8ed6c4ee579e2dc80360a2211c07129326

parent

5d56789044dea6214825376f1b262e1f732d43e6

M cmd/build/template.gocmd/build/template.go
@@ -122,6 +122,7 @@ return nil, err
} doc.Find("html").SetAttr("lang", config.DefaultLanguage) doc.Find("head > link[rel=alternate]").SetAttr("title", config.Title) + doc.Find("head > link[rel=canonical]").SetAttr("href", pageURL) doc.Find(".title").SetText(config.Title) doc.Find("title").Add(".p-name").SetText(pageTitle) doc.Find("head > style").SetHtml("\n" + string(css))
M templates/homepage.htmltemplates/homepage.html
@@ -11,6 +11,7 @@ type="application/atom+xml"
title="" href="/atom.xml" /> + <link href="" rel="canonical" /> <style></style> </head> <body>
M templates/list.htmltemplates/list.html
@@ -11,6 +11,7 @@ type="application/atom+xml"
title="Site Title" href="/atom.xml" /> + <link href="" rel="canonical" /> <style></style> </head> <body>
M templates/post.htmltemplates/post.html
@@ -11,6 +11,7 @@ type="application/atom+xml"
title="" href="/atom.xml" /> + <link href="" rel="canonical" /> <style></style> </head> <body>
M templates/tags.htmltemplates/tags.html
@@ -11,6 +11,7 @@ type="application/atom+xml"
title="Site title" href="/atom.xml" /> + <link href="" rel="canonical" /> <style></style> </head> <body>