Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/website, x/blog: rewrite relative links as absolute when embedding a blog post #36944
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.
…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 <firstname.lastname@example.org>