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

spec: headings should include anchor links #56009

Closed
mvdan opened this issue Oct 3, 2022 · 3 comments
Closed

spec: headings should include anchor links #56009

mvdan opened this issue Oct 3, 2022 · 3 comments

Comments

@mvdan
Copy link
Member

mvdan commented Oct 3, 2022

Take a look at https://pkg.go.dev/io#Pipe. When hovering the heading for the declaration, you can see a "¶" symbol, which makes it very easy to get a link anchored to that part of the page.

The Go spec lacks this. If I want an anchored link to https://go.dev/ref/spec#Type_definitions, I have two options:

  1. Go to the index to find the link and copy it. This does not always work - some sub-headings like "Type definitions" are not in the index.
  2. Use my browser's "Inspect" feature to fetch the header ID so I can manually construct the anchored link - which I did in this case.

It would be very helpful to provide "¶" symbols when hovering, much like pkgsite does, in my opinion.

cc @griesemer and cc @julieqiu in case any of pkgsite's html/css can be reused for this purpose

@mvdan
Copy link
Member Author

mvdan commented Oct 3, 2022

@rogpeppe and @myitcv remind me that we've also wanted anchor links on hover for other structured documentation pages under go.dev, such as https://go.dev/ref/mod - cc @bcmills

@ALTree
Copy link
Member

ALTree commented Oct 3, 2022

See #50210

@mvdan
Copy link
Member Author

mvdan commented Oct 3, 2022

Ah, thank you, I completely missed that one. I will instead leave a comment there.

@mvdan mvdan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2022
@golang golang locked and limited conversation to collaborators Oct 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants