Skip to content

Conversation

@goldsmithb
Copy link
Contributor

Jira Ticket


This PR adds meta tags to tell google scrapers not to index or follow links on search results pages.

We provide google a sitemap with all the pages we want indexed, so this prevents unnecessary requests from google's indexing scraper.

We add the 'noindex' and 'nofollow' rules to the following controller action(s):

  • catalog#index

We can easily add it to more actions, but this is the only one I could identify as needing it.

Copy link
Contributor

@JackBlackLight JackBlackLight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @goldsmithb, just had a few quick questions. Thanks!

<%= render 'shared/google_analytics' %>
<%= render 'shared/highwire_press_tags' %>
<%= render 'shared/social_media_tags' %>
<%= render 'shared/meta_tags' %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this template includes blacklight base template at the bottom, so maybe we don't need to render meta_tags here as well?

<%= vite_stylesheet_tag "embed.scss", media: "all" %>
<%= csrf_meta_tags %>
<%= content_for(:head) %>
<%= render 'shared/meta_tags' %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this one - but maybe? what was your rationale?

end
end
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a test for when nofollow and noindex should be false?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants