seo: mark login links as nofollow.
Mark links to the login page as rel="nofollow" so that search crawlers don't constantly try to crawl it. Otherwise the fact the login url is different on every page (/login?url=<current_url>) confuses crawlers. Also strip the url param from the canonical url (<link rel="canonical">) on the login page.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<menu id="main-menu" class="main">
|
<menu id="main-menu" class="main">
|
||||||
<% if CurrentUser.is_anonymous? %>
|
<% if CurrentUser.is_anonymous? %>
|
||||||
<%= nav_link_to("Login", login_path(url: request.fullpath)) %>
|
<%= nav_link_to("Login", login_path(url: request.fullpath), rel: "nofollow") %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= nav_link_to("My Account #{unread_dmail_indicator(CurrentUser.user)}", profile_path) %>
|
<%= nav_link_to("My Account #{unread_dmail_indicator(CurrentUser.user)}", profile_path) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<% page_title "Login" %>
|
<% page_title "Login" %>
|
||||||
<% meta_description "Login to #{Danbooru.config.app_name}" %>
|
<% meta_description "Login to #{Danbooru.config.app_name}" %>
|
||||||
|
<% canonical_url login_url %>
|
||||||
|
|
||||||
<%= render "sessions/secondary_links" %>
|
<%= render "sessions/secondary_links" %>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user