Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non-indexable logged-out links #5713

Merged
merged 2 commits into from
Jan 27, 2020

Conversation

benhalpern
Copy link
Contributor

@benhalpern benhalpern commented Jan 24, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

I saw in our search console dashboard that Google is crawling some user-only pages because we link to them in non-logged-in views. There is still a layer of authentication, so it's not a problem other than likely waisting the crawler's time (which could hurt our SEO).

This feature adds a check for user_signed_in? where functionality is only needed for signed-in users and the link does not need to be crawled by search engines. Also added nofollow on some links that should still exist for non-logged-in users but are not links to indexable content per se.

I removed the "nofollow links" part of this PR because I had hesitations about the exact right choice. Everything else should be a no-brainer.

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jan 24, 2020
rhymes
rhymes previously approved these changes Jan 26, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

LGTM!

<%= javascript_pack_tag "profileDropdown", defer: true %>
<a href="/report-abuse?url=https://dev.to/<%= @user.username %>">Report Abuse</a>
<% if user_signed_in? %>
<%= javascript_pack_tag "profileDropdown", defer: true %>
Copy link
Contributor

Choose a reason for hiding this comment

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

less JS for non logged in users! yay!

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 26, 2020
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Jan 26, 2020
@benhalpern benhalpern changed the title Remove non-indexable logged-out links and add nofollow elsewhere Remove non-indexable logged-out links Jan 26, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

Re-approving this.

+1 on doing one thing at a time :)

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 27, 2020
@benhalpern benhalpern merged commit d81f407 into master Jan 27, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Jan 27, 2020
@maestromac maestromac deleted the ben/remove-non-logged-in-connect-button branch January 27, 2020 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants