docs-v2/assets/styles
Jason Stirnaman f5535c9d5c feat(api): Hugo-native API reference rendering
Hugo-native templates for API
reference documentation. Operations render as server-side HTML instead
of client-side Redoc, providing faster page loads, full SEO
indexability, and consistent styling.

Architecture:
- Tag-based navigation: operations grouped by OpenAPI tag, accessed
  via tag pages only (no individual operation URLs)
- Generation script auto-discovers products from .config.yml files,
  deriving Hugo paths and menu keys from directory structure
- Per-tag JSON/YAML chunks for fast Hugo template rendering
- Inline curl examples generated from OpenAPI specs at build time

Templates (layouts/api/, layouts/partials/api/):
- tag-renderer.html: renders all operations for a tag
- operation.html: individual operation with parameters, request body,
  responses, and schema rendering
- code-sample.html: curl examples with Ask AI integration
- section-children.html: tag listing on section index pages
- all-endpoints-list.html: all operations sorted by path

Generation (api-docs/scripts/generate-openapi-articles.ts):
- Auto-discovery from .config.yml replaces hardcoded productConfigs
- Each API section generates independently (no cross-spec merging)
- Frontmatter-driven template data (specDownloadPath, articleDataKey)
- Link transformation: /influxdb/version/ placeholders resolved to
  product-specific paths

Removed:
- Redoc renderer, JavaScript components, and CSS
- Shadow DOM test infrastructure (~160 lines)
- Operation page generation (dead generatePathPages function)
- mergeArticleData() and slugifyDisplayName()

Styles (assets/styles/layouts/_api-*.scss):
- 3-column layout: sidebar, content, sticky TOC
- Theme-aware code blocks for curl examples
- Method badges (GET/POST/PUT/DELETE) with color coding
- Collapsible schema sections with depth tracking

Tests (cypress/e2e/content/api-reference.cy.js):
- Tag page rendering with operation structure
- Download button verification per section
- All-endpoints page with operation cards
- Related links from x-related OpenAPI extension
- Code sample and Ask AI link validation
2026-03-15 22:17:33 -05:00
..
components fix(version-detector): centralize Grafana links and DRY up host examples (#6693) 2026-01-26 18:42:09 -06:00
layouts feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00
themes feat(ent3): add experimental badge for --use-pacha-tree (#6857) 2026-02-23 14:58:35 -06:00
tools Add support for GitHub style alerts (#5667) 2024-11-07 14:54:01 -07:00
sidebar-closed.scss reworked top nav structure and responsive styles 2020-09-02 12:15:55 -06:00
sidebar-open.scss reworked top nav structure and responsive styles 2020-09-02 12:15:55 -06:00
styles-api.scss WIP api-docs autogen, stylesheets, and auto-build process 2019-09-30 10:00:22 -06:00
styles-dark.scss made light theme default, renamed layouts 2019-05-06 09:16:38 -06:00
styles-default.scss feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00