golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.72k stars 17.62k forks source link

x/website: Language Specification: Visible anchors for linkable sections #50210

Open Deleplace opened 2 years ago

Deleplace commented 2 years ago

What is the URL of the page with the issue?

https://go.dev/ref/spec

Screenshot

image

What did you do?

I wanted to create a direct hyperlink to the section String concatenation and add it to a webpage in another Go-related website.

What did you expect to see?

Feature request: all the section headings (h2, h3, h4) would come with a trailing ¶ as a visual indicator for "Click here to get the direct URL to this section". Optionally, the ¶ char only shows up when the mouse approaches the heading. (All of this is the existing behaviour in all package pages at pkg.go.dev)

image

What did you see instead?

ALTree commented 2 years ago

I had the same issue the other day. I think the old specification page on golang.org had visible anchors, because I remember using them in the past; so this is a recent regression due to the website migration.

mvdan commented 2 years ago

Coming from https://github.com/golang/go/issues/56009 (a duplicate now closed), I'd like to see the same improvement to all structured documentation pages with headings under go.dev as well. For example, https://go.dev/ref/mod is a regular pain point for me, as I want to point other Go users to specific parts of the large page. cc @bcmills