docs-v2/layouts/partials
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
..
api feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00
article feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00
footer fix(version-detector): centralize Grafana links and DRY up host examples (#6693) 2026-01-26 18:42:09 -06:00
header chore(controller): add eula and eula acceptance to telegraf controller (#6759) 2026-02-05 10:27:15 -07:00
product refactor: replace URL-parsing in shortcodes with cascade product data (#6883) 2026-02-27 09:46:57 -06:00
sidebar feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00
svgs New home page layout (#3958) 2022-04-14 15:26:54 -06:00
topnav dar issue 563 - Cloud 1 documentation, support, and migration (#6729) 2026-01-15 14:55:06 -06:00
article.html Feature: Generate documentation in LLM-friendly Markdown (#6555) 2025-12-01 12:32:28 -06:00
footer.html Initial Kapa.ai chat integration. 2025-02-03 08:31:55 -06:00
header.html chore(analytics): Migrate to GA4 Google tag. If on the local server, use debug mode and prevent tracking. Add the www.influxdata.com Google tag script. Remove the conditional from header.html. Remove the old, unused GTM ID 2025-06-25 21:47:48 -05:00
sidebar.html feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00
topnav.html feat(feature-boards): embed product feature boards in the docs (#6767) 2026-01-30 12:41:02 -07:00