sensu-docs icon indicating copy to clipboard operation
sensu-docs copied to clipboard

Tags for specific API object attributes

Open grepory opened this issue 6 years ago • 3 comments

When linking to API/Reference sections for docs, I would like to be able to point to a specific attribute. E.g. when discussing Check TTLs, I should be able to link to the section of the docs with something like https://docs.sensu.io/sensu-core/2.0/reference/checks/#ttl.

This is an issue with:

  • [X] Bug (site functionality or styling)
  • [ ] Errata (fix needed for doc content)
  • [ ] New content (guide wanted)

Expected Behavior

Each object attribute should have an anchor.

Current Behavior

There are no anchors for object attributes.

grepory avatar Jun 04 '18 17:06 grepory

Implemented a proof-of-concept for this with https://docs.sensu.io/sensu-core/2.0/reference/events/#metrics by adding <a name="metrics"> above the metrics attribute table.

Known issues:

  • Extremely manual
  • Links don't take into account header space

apaskulin avatar Sep 13 '18 16:09 apaskulin

This would be nice to have. Current manual process works, but anchor links cause table heading to "hide" behind the version banner at the top of each docs page.

hillaryfraley avatar Dec 19 '19 20:12 hillaryfraley

I was about to open an issue for essentially the same thing.

I'd love to be able to have anchors to specific fields, especially for complex objects, instead of only having #top-level-attributes as the closest anchor. It really helps when sharing documentation about specific fields with other people, instead of linking to the top level and saying "scroll down to X".

ccressent avatar Feb 16 '22 20:02 ccressent