docs-v2/layouts/partials/article
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
..
append.html Update shared content usage in v2 docs and more (#5953) 2025-04-02 15:54:32 -06:00
content.html Update shared content usage in v2 docs and more (#5953) 2025-04-02 15:54:32 -06:00
contributors.html Auto-generated Flux docs (#4158) 2022-06-23 16:21:58 -06:00
feedback.html Route InfluxDB 3 Enterprise docs issue submissions to support portal (#6723) 2026-01-12 12:22:31 -06:00
flux-contrib.html chore(hugo): Update shortcodes and templates to avoid calling isset on <nil> 2025-05-19 14:57:15 -05:00
flux-experimental.html chore(hugo): Update shortcodes and templates to avoid calling isset on <nil> 2025-05-19 14:57:15 -05:00
format-selector.html feat: add InfluxDB documentation MCP server integration (#6830) 2026-02-17 20:42:56 -06:00
page-meta.html Resources videos (#3494) 2021-12-17 12:14:30 -06:00
prepend.html Ask AI group filters (#6529) 2025-11-18 16:43:02 -06:00
related.html feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00
special-state.html Telegraf Controller (alpha) Documentation (#6685) 2025-12-31 14:49:32 -07:00
stable-version.html - **Improved successor handling in stable-version.html** 2025-05-19 09:55:06 -05:00
supported-versions.html fix(flux-influxdb-versions): Fixes modal trigger for flux-influxdb-versions and refactors the trigger to a component. 2025-03-27 20:10:13 -05:00
tags.html chore(hugo): Update shortcodes and templates to avoid calling isset on <nil> 2025-05-19 14:57:15 -05:00