From 9da3cbcf9569dd6f2a0f794d4d0dc0fce3ffac7e Mon Sep 17 00:00:00 2001 From: Jeremy Prevost Date: Fri, 28 Feb 2025 14:50:41 -0500 Subject: [PATCH] Adds crawler directives to result and record pages Why are these changes being introduced: * It doesn't make sense to have search engines index and follow links from our own results and record pages Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/TIMX-476 How does this address that need: * adds meta robots tag with noindex, nofollow rules --- app/views/record/view.html.erb | 4 ++++ app/views/search/results.html.erb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/views/record/view.html.erb b/app/views/record/view.html.erb index 7c9bb0c8..cd5c4a2e 100644 --- a/app/views/record/view.html.erb +++ b/app/views/record/view.html.erb @@ -1,5 +1,9 @@ <%= content_for(:title, record_page_title(@record)) %> +<% content_for :additional_meta_tag do %> + +<% end %> + <%= render(partial: 'shared/error', collection: @errors) %> <%= render(partial: 'shared/site_title') %> diff --git a/app/views/search/results.html.erb b/app/views/search/results.html.erb index 7509fdf1..d9b97e02 100644 --- a/app/views/search/results.html.erb +++ b/app/views/search/results.html.erb @@ -1,5 +1,9 @@ <%= content_for(:title, results_page_title(@enhanced_query)) %> +<% content_for :additional_meta_tag do %> + +<% end %> +
<%= render partial: "shared/site_title" %>