Skip to content

x/pkgsite: promote examples as a top-level TOC item and populate with children #73951

Open
@matttproud

Description

@matttproud

What is the URL of the page with the issue?

https://pkg.go.dev/sort

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15

Screenshot

Before:

Image

(The colored boxes are my annotations.)

What did you do?

I visited https://pkg.go.dev/sort to find examples.

(The truth is any package with examples will work. Packages that have a large number of examples anchored toward identifiers as opposed to package-level examples really demonstrate the insufficient of the status quo well.)

What did you expect to see?

Per the description that I noted in https://go-review.googlesource.com/c/pkgsite/+/673435, I wanted to have the examples prominently listed, particularly as a top-level item in the TOC and with the example children enumerated. I would want to see the examples presented somewhat similarly to below.

After (applied with change no. 673435):
Image

(The colored boxes are my annotations.)

What did you see instead?

Just an entry in the TOC nested under index for the examples, which does not enumerate what examples are available to a document consumer. See screenshot supra marked as "Before."

Metadata

Metadata

Assignees

Labels

FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.pkgsite

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions