UX: Include message when crawler content is omitted (#26325)

To improve performance, we omit the basic-HTML version of pages when users are logged in, or when they are using a modern mobile device. This can be confusing when analysing the SEO of sites, so this commit adds a short static message when content is omitted.
This commit is contained in:
David Taylor 2024-03-22 17:24:57 +00:00 committed by GitHub
parent f7b73f3d70
commit 4a7e69d8ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -126,7 +126,8 @@
<link rel="next" href="<%= @list.more_topics_url -%>">
<% end %>
<% end %>
<% else %>
<%= t(:crawler_content_hidden) %>
<%- end %> <!-- include_crawler_content? -->
<% if @rss %>

View File

@ -139,7 +139,9 @@
</div>
<% end %>
<%= build_plugin_html 'server:topic-show-after-posts-crawler' %>
<%= build_plugin_html 'server:topic-show-after-posts-crawler' %>
<% else %>
<%= t(:crawler_content_hidden) %>
<% end %>
<% content_for :head do %>

View File

@ -481,6 +481,7 @@ en:
next_page: "next page →"
prev_page: "← previous page"
page_num: "Page %{num}"
crawler_content_hidden: "HTML content omitted because you are logged in or using a modern mobile device."
home_title: "Home"
topics_in_category: "Topics in the '%{category}' category"
rss_posts_in_topic: "RSS feed of '%{topic}'"