Skip to content

API docs: add ability to view individual symbols

Warren Gifford requested to merge sg/apidocs-distinct-pages into main

Created by: slimsag

This adds the ability to view individual symbols in isolation, rather than on the entire, full page.

  • /github.com/golang/go/-/docs/archive/tar#ErrHeader -> full page, scrolled to ErrHeader
  • /github.com/golang/go/-/docs/archive/tar?ErrHeader -> shows just ErrHeader
  • /github.com/golang/go/-/docs/archive/tar#Writer -> full page, scrolled to Writer
  • /github.com/golang/go/-/docs/archive/tar#Writer -> shows just Writer on a single page, with the methods etc. below it.

This is primarily useful for:

  1. Sharing a link to something specific with others - as the opengraph metadata can (in the future) show exactly the thing you're linking to ("type Writer ..." instead of just "Package tar").
  2. Search engines can index these pages individually.
  3. We can display more content on such pages, such as more usage examples, more easily.

Fixes #22575 (closed)

Signed-off-by: Stephen Gutekanst [email protected]

Merge request reports

Loading