-
Notifications
You must be signed in to change notification settings - Fork 268
Add noindex to pages under badge.buildkite.com #2567
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
Conversation
Preview URL: https://2567--bk-docs-preview.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL https://badge.buildkite.com/docs. Looks good to me if looks good to @dannymidnight 😊
app/views/application/_head.html.erb
Outdated
@@ -40,7 +40,7 @@ | |||
|
|||
<%= render 'analytics', application: 'docs', title: "Docs / #{content_for(:page_title)}", logged_in: probably_authenticated? %> | |||
|
|||
<% if ENV.fetch("ROBOTS_NO_INDEX") { "false" } == "true" %> | |||
<% if ENV.fetch("ROBOTS_NO_INDEX") { "false" } == "true" || request.base_url == "https://badge.buildkite.com" %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @hannahcancode as a thought, should we address the https://badge.buildbox.io
domain as well?
Currently https://badge.buildbox.io also lands the user on the Docs site. It's also indexed in Google.
Acknowledging this PR specifically addresses the badge.
subdomain. Over to you to decide the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good callout @olyism, I didn't even know about badge.buildbox.io. I suspect it's not as big an issue because it doesn't pollute buildkite.com in the google index, but seems sensible to get rid of it too. I'll push up something for that.
I'm now crowdsourcing my ruby: https://buildkite-corp.slack.com/archives/C05NAGJREJU/p1700609961943819 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks for the detailed PR @hannahcancode.
✨ I am not precious about my ruby so please correct if there's a better way to do this ✨
Add noindex when served under badge.buildkite.com
noindex
to the badge.buildkite.com/docs, so google will stop indexing them at all.