LP1406451 Set rel=canonical for record and library pages
authorDan Scott <dscott@laurentian.ca>
Wed, 31 Dec 2014 05:33:41 +0000 (00:33 -0500)
committerDan Scott <dscott@laurentian.ca>
Sat, 17 Jan 2015 15:43:06 +0000 (10:43 -0500)
commitbd76b81e72990149ccfde44bb0478db176f99a6b
tree23c10f84384aeabfd10184d8ee9639b9e20318b1
parent8b9a62952c00ef71b00ce449277978f1118e8030
LP1406451 Set rel=canonical for record and library pages

Search engines use the "<link rel=canonical>" convention to determine that, no
matter how many variations on a URL you might generate through the likes of
appending &query= parameters, etc, those URLs are all the same as the value of
the href attribute in the <link> element.

Start with a simple implementation that, first, provides a placeholder in the
TPAC base where any page-specific <meta> or <link> (or really, any other <head>
contents) should go; then denotes the current page URL (stripped of all query
params) as the canonical URL for record and library pages.

This should help prevent search engines from crawling endless variations of the
same page, lowering load on Evergreen servers and potentially improving the
ranking of the canonical URLs.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/library.tt2
Open-ILS/src/templates/opac/parts/base.tt2
Open-ILS/src/templates/opac/record.tt2