Add Component and Service API overview pages#5068
Open
btshrewsbury-viam wants to merge 4 commits into
Open
Conversation
Add two new "Overview" pages — one under Reference > APIs > Component
APIs, one under Reference > APIs > Service APIs — that render every API
type and its methods in a compact CSS grid. Selecting an API name opens
its full reference; selecting a method jumps to that method's anchor.
Method data is read at Hugo build time from the existing auto-generated
per-API `-table.md` includes via the new `api-overview` shortcode, so
the grid can never drift from the per-API detail pages.
- data/{component,service}_apis.yaml: API title/link/table-include map
- layouts/shortcodes/api-overview.html: renders the grid from a data file
- docs/reference/apis/{components,services}/overview.md: the new pages
- assets/scss/_styles_project.scss: .api-overview-grid / .api-method-chip
- docs/reference/apis/_index.md: discoverability cards to both pages
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Address review feedback on the overview pages: - Sort APIs and their methods alphabetically (in the shortcode, so it holds regardless of data-file order). - List one method per line instead of wrapped chips. - Give each card a header band with the API name in Space Grotesk and a light-blue hover highlight on method rows; match the card border to the rest of the docs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
|
It looks like the following files may have been renamed. Please ensure you set all needed aliases: |
Merge latest main, which removed the Navigation service API (#5067). Its generated method table no longer exists, so remove the Navigation entry from data/service_apis.yaml; the overview now lists 8 services. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Adds two new Overview pages that let you scan every API type and its methods at a glance:
/reference/apis/components/overview/) — 18 component APIs/reference/apis/services/overview/) — 9 service APIsEach page is a compact CSS grid of cards. A card's title links to that API's full reference page; each method renders as a chip linking straight to the method's anchor on that page. The
_index.mdAPIs landing page gets a discoverability card linking each new overview.Why / design
Today the only way to see what methods an API offers is to open each component/service page one at a time. These pages give one scannable grid.
Method data is read at Hugo build time from the existing auto-generated per-API
-table.mdincludes (the same files the detail pages render), via a newapi-overviewshortcode driven by a small data file. So the overview can never drift from the per-API pages — when the API surface changes, the generated tables update and the grid follows automatically. This is why it's a shortcode + data file rather than a static markdown page.Files
data/component_apis.yaml,data/service_apis.yamlmovement-sensoruses its manual table)layouts/shortcodes/api-overview.htmldocs/reference/apis/{components,services}/overview.mdassets/scss/_styles_project.scss.api-overview-grid/.api-method-chipstylesdocs/reference/apis/_index.mdslamis intentionally excluded — it has a generated table but no detail page (its URL is aliased away).Verification
movement-sensor(manually maintained table) andboard(3-column table) render identically to standard ones.htmltest) runs in CI.markdownlintclean on the new/changed pages.🤖 Generated with Claude Code