Bugzilla – Attachment 163987 Details for
Bug 35812
Should specify canonical URLs to help search indexers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH 1/4] Bug 35812: add noindex attribute to search result pages in OPAC
0001-Bug-35812-add-noindex-attribute-to-search-result-pag.patch (text/plain), 4.13 KB, created by
Michał
on 2024-03-27 12:28:12 UTC
(
hide
)
Description:
[PATCH 1/4] Bug 35812: add noindex attribute to search result pages in OPAC
Filename:
MIME Type:
Creator:
Michał
Created:
2024-03-27 12:28:12 UTC
Size:
4.13 KB
patch
obsolete
>From 7cb79d33b9a5f9f1e9aeca4cec48709c6e85ec76 Mon Sep 17 00:00:00 2001 >From: MichaÅ Kula <148193449+mkibp@users.noreply.github.com> >Date: Wed, 27 Mar 2024 09:25:37 +0100 >Subject: [PATCH 1/4] Bug 35812: add noindex attribute to search result pages > in OPAC > >This will prevent search engines from putting the search results pages into their indexes, to prevent cluttering of the search results and give better visibility to the actual bibliographic records' pages. > >Note that "noindex" is separate from "nofollow", meaning that the search engine is allowed to get and process the search results page and extract ("follow") further links from it, such as links to biblio records, which is exactly what we want. > >This approach is better to the sitemaps, which search engines are free to choose whether to use or not, based on multiple factors such as the size of the page. In practice for small pages Google will just not download them at all, meaning that indexing by following links around is the only way the indexer will extract any links. > >Note that for this to work properly, you must NOT block the affected pages in your robots.txt file (they're not blocked by default). > >Also, this patch moves "cssinclude" block in opac-results.tt inside of <head>, because in all other templates it's inside, meaning its current positioning is a small mistake I fixed while at it. >--- > .../opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 3 ++- > 3 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt >index ed9819ad20..8dc1c2b9ef 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt >@@ -5,6 +5,7 @@ > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Authority search › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> >+<meta name="robots" content="noindex"> > [% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %][% END %] > </head> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt >index d050b5941d..6619137c4c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt >@@ -6,6 +6,7 @@ > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Browse our catalog › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> >+<meta name="robots" content="noindex"> > [% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %][% END %] > [% INCLUDE 'bodytag.inc' bodyid='opac-browser' %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 5df882aff7..aa9f1e2076 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -25,11 +25,12 @@ > › > [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog > </title> >+<meta name="robots" content="noindex"> > [% INCLUDE 'doc-head-close.inc' %] >+[% BLOCK cssinclude %][% END %] > > <link rel="alternate" type="application/rss+xml" title="[% LibraryName | html %] Search RSS feed" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss" /> > </head> >-[% BLOCK cssinclude %][% END %] > [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %] > [% INCLUDE 'masthead.inc' %] > >-- >2.42.0.windows.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35812
:
163987
|
163988
|
163989
|
163990
|
164242
|
164243
|
164244
|
164245
|
166404
|
166405
|
166406
|
166407