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

Immediately redirect to www.gitpod.io for any website slugs. #5531

Merged
merged 1 commit into from
Sep 6, 2021

Conversation

svenefftinge
Copy link
Member

fixes #5452

@roboquat roboquat added the size/S label Sep 4, 2021
@svenefftinge svenefftinge force-pushed the se/website-redirect branch 2 times, most recently from 6cadfed to 1ead206 Compare September 4, 2021 07:24
@ghuntley
Copy link
Contributor

ghuntley commented Sep 4, 2021

Thanks for fixing this particular paper cut that has been very frustrating 🧡

@svenefftinge
Copy link
Member Author

svenefftinge commented Sep 4, 2021

/werft run

👍 started the job as gitpod-build-se-website-redirect.4

@svenefftinge
Copy link
Member Author

svenefftinge commented Sep 6, 2021

/werft run

👍 started the job as gitpod-build-se-website-redirect.5

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

LGTM! Approving to unblock merging this but holding for one minor comment which could be resolved in a follow up issue. 🏀

/hold

@@ -53,6 +53,15 @@ function isGitpodIo() {
return window.location.hostname === 'gitpod.io' || window.location.hostname === 'gitpod-staging.com' || window.location.hostname.endsWith('gitpod-dev.com') || window.location.hostname.endsWith('gitpod-io-dev.com')
}

function isWebsiteSlug(pathName: string) {
const slugs = ['chat', 'features', 'screencasts', 'blog', 'docs', 'changelog', 'pricing', 'self-hosted', 'gitpod-vs-github-codespaces', 'support', 'about', 'careers', 'contact', 'media-kit', 'imprint', 'terms', 'privacy']
return slugs.some(slug => pathName.startsWith('/' + slug + '/'));
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Should we also redirect URLs without a trailing /? For example, /changelog/ v. /changelog.

Copy link
Contributor

Choose a reason for hiding this comment

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

change: add /values as well please 🧡

Copying/pasting the link from notion is getting old.

@roboquat
Copy link
Contributor

roboquat commented Sep 6, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gtsiolis

Associated issue: #5452

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat
Copy link
Contributor

roboquat commented Sep 6, 2021

LGTM label has been added.

Git tree hash: f5730f903d6c8d322b963bcb597c1c5542cb0a68

@roboquat
Copy link
Contributor

roboquat commented Sep 6, 2021

New changes are detected. LGTM label has been removed.

@gtsiolis
Copy link
Contributor

gtsiolis commented Sep 6, 2021

Works like a charm! 🔮

Removing hold!

@roboquat roboquat merged commit 6ae2dc8 into main Sep 6, 2021
@roboquat roboquat deleted the se/website-redirect branch September 6, 2021 11:01
@gtsiolis
Copy link
Contributor

gtsiolis commented Sep 6, 2021

Noticed that when having a team name that matches these URLs we also redirect to the website instead of /values/projects which could be minor since a) we only link to /team-name/projects and b) could be resolved with #5465. Cc @svenefftinge

For example, try creating team values and visiting https://gitpod.io/values as a logged in user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Make www.gitpod.io redirect work for logged out users
4 participants