Navigation Menu

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

x/website, x/blog: rewrite relative links as absolute when embedding a blog post #36944

Closed
dmitshur opened this issue Jan 31, 2020 · 2 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dmitshur
Copy link
Contributor

Most blog posts use absolute links when pointing to other blog posts or pages on blog.golang.org, but there are some that use relative links, and blog post authors may pick one or the other. When reading blog posts at https://blog.golang.org, both work.

Relative links become broken when embedded directly on the golang.org website, because they start being relative to golang.org rather than the intended blog.golang.org domain.

See #36930 where this happened.

Either the website should rewrite relative links so they are not broken, or if that is too disruptive, then a test should be added that would catch when blog post authors use relative links.

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 31, 2020
@dmitshur dmitshur added this to the Unreleased milestone Jan 31, 2020
@gopherbot
Copy link

Change https://golang.org/cl/217239 mentions this issue: content/go1.15-proposals.article: revert "use relative links for other blog articles"

gopherbot pushed a commit to golang/blog that referenced this issue Jan 31, 2020
…r blog articles"

This reverts CL 216626 (commit 8bf1296).

We cannot rely on relative links in blog posts to stay relative to
blog.golang.org, because blog posts are also embedded on golang.org.
This change caused those links to point to
https://golang.org/go2-here-we-come, which is 404.

Fixes golang/go#36930
Updates golang/go#36944

Change-Id: Ie5ca8f112ff6465328d258b283d540c07e909a54
Reviewed-on: https://go-review.googlesource.com/c/blog/+/217239
Reviewed-by: Robert Griesemer <gri@golang.org>
gopherbot pushed a commit to golang/website that referenced this issue May 26, 2021
… for other blog articles"

This reverts CL 216626 (commit 8bf1296992b6579acabcba62cc6cd0efe039c38a).

We cannot rely on relative links in blog posts to stay relative to
blog.golang.org, because blog posts are also embedded on golang.org.
This change caused those links to point to
https://golang.org/go2-here-we-come, which is 404.

Fixes golang/go#36930
Updates golang/go#36944

Change-Id: Ie5ca8f112ff6465328d258b283d540c07e909a54
Reviewed-on: https://go-review.googlesource.com/c/blog/+/217239
Reviewed-by: Robert Griesemer <gri@golang.org>
X-Blog-Commit: e1c854a5c639de192ed53c9fb8059c6be190b182
@seankhliao
Copy link
Member

Doesn't seem relevant anymore as the blog index doesn't embed posts

passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
… for other blog articles"

This reverts CL 216626 (commit 8bf1296992b6579acabcba62cc6cd0efe039c38a).

We cannot rely on relative links in blog posts to stay relative to
blog.golang.org, because blog posts are also embedded on golang.org.
This change caused those links to point to
https://golang.org/go2-here-we-come, which is 404.

Fixes golang/go#36930
Updates golang/go#36944

Change-Id: Ie5ca8f112ff6465328d258b283d540c07e909a54
Reviewed-on: https://go-review.googlesource.com/c/blog/+/217239
Reviewed-by: Robert Griesemer <gri@golang.org>
X-Blog-Commit: e1c854a5c639de192ed53c9fb8059c6be190b182
@golang golang locked and limited conversation to collaborators Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants