Bug 35812: Add canonical URL for biblio details page

This adds a nice canonical URL for search engines to use. Will prevent duplicates with different URL query parameters from getting indexed separately, will also prevent search engine confusion when opac-search.pl redirects to opac-detail.pl when there's just one result.

Should result in prettier/simpler URLs in the search engines too, plus removal of constant warnings in Google Search Console and other tools.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Michał Kula 2024-03-27 10:16:06 +01:00 committed by Katrin Fischer
parent 2273ac8080
commit 119c48e6b6
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -31,6 +31,7 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>Details for: [% INCLUDE 'biblio-title-head.inc' %] &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
<link rel="canonical" href="[% OPACBaseURL | url %]/bib/[% biblio.biblionumber | url %]" />
[% Asset.css("lib/emoji-picker/css/emoji.css") | $raw %]
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %]
[% Asset.css("lib/verovio/midiplayer.css") | $raw %]