Commit Graph

5 Commits (feat-api-uplift)

Author SHA1 Message Date
Jason Stirnaman 2b3ed56218 refactor(api): complete Hugo-native migration, remove RapiDoc
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).
2026-02-13 15:07:02 -06:00
Jason Stirnaman 345bdc3058 fix(api): use reliable path extraction for dual download buttons
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"
2026-02-06 11:15:09 -06:00
Jason Stirnaman 727a9befb7 feat(api): consolidate API docs to tag pages with inline operations
Migrate API documentation from individual operation pages to tag pages
where all operations for a tag are rendered inline using RapiDoc.

Key changes:
- Remove operation links from left sidebar (tags only, no children)
- Generate server-side TOC from frontmatter operations array
- Show method badge + human-readable summary in TOC (not paths)
- Support hash-based navigation (#post-/api/v3/configure/distinct_cache)
- RapiDoc scrollToPath() handles TOC clicks to shadow DOM elements
- goto-path attribute initializes to operation from URL hash
- update-route attribute updates URL hash as user navigates

Files created:
- layouts/partials/api/rapidoc-tag.html

Files removed:
- layouts/api-path/path.html (path page layout)
- layouts/partials/api/rapidoc-path.html (path page partial)
- Old design documents superseded by 2026-01-21 version

Files modified:
- layouts/api/list.html (embed RapiDoc, server-side TOC)
- layouts/api/section.html (simplified section layout)
- layouts/_default/api.html (fallback layout cleanup)
- layouts/partials/sidebar/api-menu-items.html (remove op children)
- assets/js/components/rapidoc-mini.ts (tag page support)
- assets/js/components/api-toc.ts (RapiDoc navigation)
- api-docs/scripts/generate-openapi-articles.ts (disable path pages)
2026-01-29 23:46:09 -06:00
Jason Stirnaman 149b9c0745 fix(api): improve API section index children display
- 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
2026-01-02 16:42:30 -06:00
Jason Stirnaman 5866560100 fix(api): render children listing on API section index pages
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.
2026-01-02 16:42:30 -06:00