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

tour: absolute links so they work in offline tour #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crisman
Copy link
Contributor

@crisman crisman commented Mar 13, 2023

Lots of links in the tour use origin-relative links on the assumption they will be used at "https://go.dev/", which works out badly if the tour is being used offline. Links inside of "#appengine:" don't need to be updated as they will be running inside the normal location. Also don't have to update links starting with "/tour" as they will work in the offline and appengine modes.

I did consider updating the links to the place they currently redirect for links like "https://go.dev/pkg/builtin" which ends up at "https://pkg.go.dev/builtin" but it is redirecting with 307 Temporary Redirect (unlike the 301 Moved Permanently "https://golang.org/" gets) so I avoided those updates.

Update origin-relative links that will appear offline to be absolute https://go.dev links.

Fixes golang/tour#1463

Lots of links in the tour use origin-relative links on the assumption
they will be used at "https://go.dev/", which works out badly if the
tour is being used offline. Links inside of "#appengine:" don't need to
be updated as they will be running inside the normal location.  Also
don't have to update links starting with "/tour" as they will work in
the offline and appengine modes.

I did consider updating the links to the place they currently redirect
for links like "https://go.dev/pkg/builtin" which ends up at
"https://pkg.go.dev/builtin" but it is redirecting with 307 Temporary
Redirect (unlike the 301 Moved Permanently "https://golang.org/" gets) so I
avoided those updates.

Update origin-relative links that will appear offline to be absolute
https://go.dev links.

Fixes golang/tour#1463
@gopherbot
Copy link
Contributor

This PR (HEAD: 9a08ddb) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/website/+/475777 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@crisman
Copy link
Contributor Author

crisman commented Apr 12, 2023

Fixes golang/tour#1473

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

Successfully merging this pull request may close these issues.

tour: relative links don't work outside of /tour for offline tour
2 participants