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>
Sun, 11 Jan 2015 02:36:20 +0000 (21:36 -0500)
commit283cd5f6639bedceeed2748674c6e6894eb4e402
tree6955c57930a3d8c95aaa1c773f60c17af7e12048
parentfacf495a28b75a44a4661ab7bb38c30547acdfb8
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