Skip to content

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

@dmitshur

Description

@dmitshur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions