Files
danbooru/app/views/layouts/_main_links.html.erb
evazion ddd149e22b 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.
2020-12-27 04:41:49 -06:00

20 lines
911 B
Plaintext

<menu id="main-menu" class="main">
<% if CurrentUser.is_anonymous? %>
<%= nav_link_to("Login", login_path(url: request.fullpath), rel: "nofollow") %>
<% else %>
<%= nav_link_to("My Account #{unread_dmail_indicator(CurrentUser.user)}", profile_path) %>
<% end %>
<%= nav_link_to("Posts", posts_path) %>
<%= nav_link_to("Comments", comments_path(:group_by => "post")) %>
<%= nav_link_to("Notes", notes_path) %>
<%= nav_link_to("Artists", artists_path) %>
<%= nav_link_to("Tags", tags_path) %>
<%= nav_link_to("Pools", gallery_pools_path) %>
<%= nav_link_to("Wiki", wiki_page_path("help:home")) %>
<%= nav_link_to("Forum", forum_topics_path, :class => (CurrentUser.has_forum_been_updated? ? "forum-updated" : nil)) %>
<% if CurrentUser.is_moderator? %>
<%= nav_link_to("Dashboard", moderator_dashboard_path) %>
<% end %>
<%= nav_link_to("More »", site_map_path) %>
</menu>