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

go.dev: include '¶' permalinks in all package doc subheadings #36808

Closed
myitcv opened this issue Jan 27, 2020 · 5 comments
Closed

go.dev: include '¶' permalinks in all package doc subheadings #36808

myitcv opened this issue Jan 27, 2020 · 5 comments
Assignees
Milestone

Comments

@myitcv
Copy link
Member

@myitcv myitcv commented Jan 27, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/testing?tab=doc

What is your user agent?

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

Screenshot

Screen Shot 2020-01-27 at 19 12 01

What did you do?

Tried to link to the "Benchmarks" subsection of the testing package docs.

What did you expect to see?

Each subheading to be a link such that hovering over it (the heading) a symbol should appear, like on godoc:

Screen Shot 2020-01-27 at 19 12 17

Clicking that link should then change to the address bar URL to include the fragment. For example on godoc, for the "Benchmarks" subsection we end up with the URL:

https://godoc.org/testing#hdr-Benchmarks

What did you see instead?

No ability to link to subsections of package documentation.

@julieqiu

This comment has been minimized.

Copy link

@julieqiu julieqiu commented Jan 28, 2020

Would you mind clarifying if you are able to link subsections today using the same URL scheme from godoc.org? For example:

https://pkg.go.dev/testing?tab=doc#hdr-Benchmarks

takes me to:
image

My understanding is that this issue is specifically asking to add a clickable symbol next to each subheading.

/cc @dmitshur

@myitcv

This comment has been minimized.

Copy link
Member Author

@myitcv myitcv commented Jan 30, 2020

@julieqiu

Would you mind clarifying if you are able to link subsections today using the same URL scheme from godoc.org?

As you demonstrated, that appears to work (not that I had tried)

My understanding is that this issue is specifically asking to add a clickable ¶ symbol next to each subheading.

Exactly, as per the original description:

Each subheading to be a link such that hovering over it (the heading) a ¶ symbol should appear, like on godoc:

Clicking that link should then change to the address bar URL to include the fragment. For example on godoc, for the "Benchmarks" subsection we end up with the URL:

@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Mar 24, 2020

I've sent a CL that should fix this issue once it is deployed. We can keep this issue open to confirm everything is working as expected.

@dmitshur dmitshur changed the title go.dev: add ability to link to package doc subheadings go.dev: include '¶' permalinks in all package doc subheadings Mar 24, 2020
@tooolbox

This comment has been minimized.

Copy link

@tooolbox tooolbox commented Mar 26, 2020

This is super important, thank you @dmitshur !

@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Mar 27, 2020

This fix has been deployed and it's working as expected. For example, see:

image

Note that it may not appear on some existing package versions until they've been reprocessed, but they should work on all new versions. Please let us know if you spot any other issues.

@dmitshur dmitshur closed this Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.