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/website: Language Specification: Visible anchors for linkable sections #50210

Open
Deleplace opened this issue Dec 16, 2021 · 2 comments
Open
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. website

Comments

@Deleplace
Copy link
Contributor

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?

  • Section headings are not hyperlinks
  • The h2 and h3 have links in the Table of Contents, which makes link creation easier. But not the h4.
  • Almost all of the h2, h3, h4 already have an id attribute. This is great, let's make good use of it! I could create my link to the section "String concatenation", but I had to inspect the page HTML for this.
  • A few id attributes are missing: Simple slice expressions, Full slice expressions, etc.
@ALTree
Copy link
Member

ALTree commented Dec 16, 2021

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.

@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 16, 2021
@hyangah hyangah modified the milestones: Unreleased, website/unplanned Jun 15, 2022
@mvdan
Copy link
Member

mvdan commented Oct 3, 2022

Coming from #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. website
Projects
None yet
Development

No branches or pull requests

5 participants