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/pkgsite: markdown links in README pages redirect to raw.githubusercontent.com/ #52683

Closed
katiehockman opened this issue May 3, 2022 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@katiehockman
Copy link
Contributor

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/DataDog/dd-trace-go#section-readme has an example, but it's not specific to this page.

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36

What did you do?

Clicked a link in the README to go to a markdown page.

What did you expect to see?

Clicking the link would take me to page where I can see the markdown file rendered correctly.

What did you see instead?

It looks like pkg.go.dev redirects README links that point to github.com to raw.githubusercontent.com. This is unfortunate for markdown files since raw.githubusercontent.com doesn’t render markdown correctly. Ideally, pkg.go.dev wouldn't redirect those links if it was a markdown file, or just change these links to be relative links, e.g. [...](CONTRIBUTING.md)

https://pkg.go.dev/cuelang.org/go#section-readme is an example of a page that uses relative links to correctly link to the github page that correctly renders the markdown (e.g. "Installing CUE")

/cc @findleyr @seankhliao

@gopherbot gopherbot added this to the pkgsite/unplanned milestone May 3, 2022
katiehockman added a commit to DataDog/dd-trace-go that referenced this issue May 3, 2022
If you try to view the contributions guide from
clicking the link at
https://pkg.go.dev/github.com/DataDog/dd-trace-go,
the links will send you to the raw files at
raw.githubusercontent.com instead of nicely formatted
Markdown on github.com. Changing absolute links that
point to our own Markdown files to instead be relative
links should resolve this issue.

See golang/go#52683 for
for context.
katiehockman added a commit to DataDog/dd-trace-go that referenced this issue May 3, 2022
If you try to view the contributions guide from clicking the link at https://pkg.go.dev/github.com/DataDog/dd-trace-go, the links will send you to the raw files at raw.githubusercontent.com instead of nicely formatted Markdown on github.com. Changing absolute links that point to our own Markdown files to instead be relative links should resolve this issue.

See golang/go#52683 for context.
@jamalc jamalc added the NeedsFix The path to resolution is known, but the work has not been done. label May 13, 2022
@gopherbot
Copy link

Change https://go.dev/cl/406195 mentions this issue: internal/frontend: prevent translation of markdown links in README files

@golang golang locked and limited conversation to collaborators May 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

3 participants