Complete Tasks 1-5 of the Hugo-native API migration:
- Promote Hugo-native templates from POC to production location
- Remove RapiDoc templates (rapidoc.html, rapidoc-tag.html, rapidoc-mini.html)
- Remove RapiDoc JS components (api-rapidoc.ts, rapidoc-mini.ts)
- Clean up generation scripts (~200 lines of dead code removed)
- Rewrite Cypress tests for standard HTML (no shadow DOM)
Templates moved from layouts/partials/api/hugo-native/ to parent.
All verifications pass (Hugo build, TypeScript compilation).
Replace unreliable findRE regex with split-based path extraction for
version detection in API section index pages. The previous regex
"[^/]+.*?" was inconsistent and could fail to extract version correctly.
Changes:
- layouts/_default/api.html: Add dual-button logic for clustered/cloud-dedicated
section index pages using split-based URL path extraction
- layouts/api/list.html: Replace findRE with split for version extraction
- layouts/api/section.html: Add dual-button logic matching api.html
The split approach extracts path segments reliably:
/influxdb3/clustered/api/ → ["", "influxdb3", "clustered", "api", ""]
$version = index 2 = "clustered"
- Always show children after content (was showing either/or)
- Use children-links class for arrow indicator styling
- Truncate descriptions to first paragraph and 200 chars
- Apply markdownify filter for proper markdown rendering
Update Hugo templates to correctly display API children listing on
section index pages (/influxdb3/core/api/, /influxdb3/enterprise/api/)
instead of the RapiDoc renderer.
- Create layouts/api/section.html for API section pages
- Update layouts/_default/api.html to detect section pages and render
content directly instead of using RapiDoc
- Clean up layouts/api/list.html debug comment
The issue was that layouts/_default/api.html took precedence over
layouts/api/list.html for section pages due to Hugo's type-based
template lookup. The fix adds .IsSection check to delegate section
pages to appropriate rendering logic.