From: Tobias Date: Sat, 2 Jan 2021 19:22:26 +0000 (+0100) Subject: Add noindex meta tag to diary index pages X-Git-Tag: live~2171^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/f36b6375e9a61f44b20bc638e07a7024f4437869 Add noindex meta tag to diary index pages Google (and other search engines) should follow all links on this page, but only index the actual diary_entry#show and not the #index. This meta tag tells google to do just that (https://developers.google.com/search/docs/advanced/crawling/block-indexing?hl=en). Part of https://github.com/openstreetmap/openstreetmap-website/issues/2851 --- diff --git a/app/views/diary_entries/index.html.erb b/app/views/diary_entries/index.html.erb index 96c052da6..cb3f7f832 100644 --- a/app/views/diary_entries/index.html.erb +++ b/app/views/diary_entries/index.html.erb @@ -1,3 +1,4 @@ +<% content_for :head, tag(:meta, :name => :robots, :content => :noindex) %> <% content_for :heading do %>
id="userinformation"<% end %>> <% if @user %>