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: automatic URL fragments for sub-sections of 'Minor changes to the library' are overly repetitive #70847

Open
bradfitz opened this issue Dec 14, 2024 · 1 comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. website

Comments

@bradfitz
Copy link
Contributor

Is something duplicating the fragment names in the release notes?

https://tip.golang.org/doc/go1.24#gotypespkggotypes
https://tip.golang.org/doc/go1.24#encodingjsonpkgencodingjson
https://tip.golang.org/doc/go1.24#archivepkgarchive

I'd expect just archive or pkgarchive at most.

Others are pretty: https://tip.golang.org/doc/go1.24#runtime (which is why I guess the pkg is in there, to distinguish it from https://tip.golang.org/doc/go1.24#runtimepkgruntime ... but that's two runtime in that fragment)

/cc @dmitshur

@dmitshur dmitshur changed the title website: release note fragments are ugly x/website: automatic URL fragments for sub-sections of 'Minor changes to the library' are overly repetitive Dec 14, 2024
@dmitshur
Copy link
Contributor

dmitshur commented Dec 14, 2024

These headings are automatically generated rather than hand-written, and it's likely they got more repetitive after we switched to using Markdown for release notes instead of raw HTML (e.g., issue #64169, CL 539755, CL 342610, etc.). This affects old release notes too, not only Go 1.24 ones.

In the Markdown source, package headings include the import path and a link to docs:

#### [`encoding/json`](/pkg/encoding/json/)

(_content/doc/go1.24.md#L535)

Then goldmark's parser.WithAutoHeadingID() option is used, and it likely ends up concatenating the text and URL when generating the heading ID, leading to the following rendered HTML:

<h4 id="encodingjsonpkgencodingjson"><a href="/pkg/encoding/json/"><code>encoding/json</code></a></h4>

There's definitely room to reduce repetition. Perhaps something like "pkg-{importpath}" would work well for all the 'Minor changes to the library' sub-headings.

@gopherbot gopherbot added this to the Unreleased milestone Dec 14, 2024
@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 18, 2024
@findleyr findleyr modified the milestones: Unreleased, website/backlog Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. website
Projects
None yet
Development

No branches or pull requests

5 participants