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>
Wed, 31 Dec 2014 05:33:41 +0000 (00:33 -0500)
commit84a0144d516a824078171e0ee035d634a7bd438f
tree9cd2bcd379eb525e670eac1a7b1a792dd3113bdb
parent4bd42e9a2fc973351edd9a58b00c2feec949cb1a
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