docs-v2/helper-scripts
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
..
cloud-serverless chore(ci): Automation scripts to compare influxdb3 CLI help to reference documentation and generate an audit report, runs influxdb3 core and enterprise using Docker, improves compose.yaml, restructures helper-scripts for different versions 2025-07-07 12:13:36 -05:00
common chore: improve docs-cli with unified flag syntax and YAML config (#6778) 2026-02-04 16:44:35 -06:00
influxdb3-distributed chore(ci): Automation scripts to compare influxdb3 CLI help to reference documentation and generate an audit report, runs influxdb3 core and enterprise using Docker, improves compose.yaml, restructures helper-scripts for different versions 2025-07-07 12:13:36 -05:00
influxdb3-plugins fix(plugins): porting README details to docs (#6806) 2026-02-09 14:55:23 -06:00
label-migration feat(ci): add doc review pipeline with auto-labeling and Copilot review (#6890) 2026-03-09 20:22:31 -05:00
README.md chore: improve docs-cli with unified flag syntax and YAML config (#6778) 2026-02-04 16:44:35 -06:00
build-agent-instructions.js chore(js): formatting 2025-10-08 16:51:25 -05:00
migrate-api-links.cjs feat(api): Hugo-native API reference rendering 2026-03-15 22:17:33 -05:00

README.md

InfluxData Documentation Helper Scripts

This directory contains scripts to assist with InfluxDB documentation workflows, including release notes generation, CLI/API documentation auditing, and version management.

Directory Structure

helper-scripts/
├── common/                    # Shared scripts used across all products
├── influxdb3-monolith/       # Scripts for InfluxDB 3 Core & Enterprise
├── influxdb3-distributed/    # Scripts for InfluxDB 3 Clustered & Cloud Dedicated
├── cloud-serverless/         # Scripts for InfluxDB Cloud Serverless
└── output/                   # Generated outputs from all scripts

Product Categories

InfluxDB 3 Monolith

  • Products: InfluxDB 3 Core, InfluxDB 3 Enterprise
  • Deployment: Single binary deployment
  • Scripts Location: influxdb3-monolith/

InfluxDB 3 Distributed

  • Products: InfluxDB 3 Clustered, InfluxDB 3 Cloud Dedicated
  • Deployment: Distributed/Kubernetes deployment
  • Scripts Location: influxdb3-distributed/

Cloud Serverless

  • Product: InfluxDB Cloud Serverless
  • Deployment: Fully managed cloud service
  • Scripts Location: cloud-serverless/

Common Scripts

Release Notes Generation

Release notes are generated using the unified docs CLI. See scripts/docs-cli/README.md for full documentation.

Usage:

# Using product keys (resolves paths from config)
npx docs release-notes v3.1.0 v3.2.0 --products influxdb3_core,influxdb3_enterprise

# Using direct repository paths
npx docs release-notes v3.1.0 v3.2.0 --repos ~/repos/influxdb,~/repos/enterprise

common/update-product-version.sh

Updates product version numbers in data/products.yml and related documentation files.

Usage:

./common/update-product-version.sh --product <product> --version <version>

Example:

./common/update-product-version.sh --product core --version 3.2.1

Product-Specific Scripts

InfluxDB 3 Monolith (Core & Enterprise)

See influxdb3-monolith/README.md for detailed documentation.

Key Scripts:

  • audit-cli-documentation.sh - Audits CLI commands against existing documentation
  • setup-auth-tokens.sh - Sets up authentication tokens for local containers

InfluxDB 3 Distributed (Clustered & Cloud Dedicated)

See influxdb3-distributed/README.md for detailed documentation.

Key Scripts:

  • clustered-release-artifacts.sh - Downloads release artifacts for Clustered releases

Output Directory

All scripts write their outputs to organized subdirectories:

output/
├── release-notes/      # Generated release notes
├── cli-audit/         # CLI documentation audit reports
├── api-audit/         # API documentation audit reports
└── artifacts/         # Downloaded release artifacts

GitHub Workflow Integration

These scripts are integrated with GitHub Actions workflows:

  • Workflow: .github/workflows/prepare-release.yml
  • Uses: docs release-notes (unified CLI), update-product-version.sh

Quick Start

  1. Clone the repository

    git clone https://github.com/influxdata/docs-v2.git
    cd docs-v2/helper-scripts
    
  2. Make scripts executable

    find . -name "*.sh" -type f -exec chmod +x {} \;
    
  3. Run a script

    # Generate release notes (using unified CLI)
    npx docs release-notes v3.1.0 v3.2.0 --products influxdb3_core,influxdb3_enterprise
    
    # Audit CLI documentation
    npx docs audit main --products influxdb3_core
    

Contributing

When adding new scripts:

  1. Place in the appropriate product directory
  2. Follow naming conventions (lowercase with hyphens)
  3. Include comprehensive help text and documentation
  4. Update the relevant README files
  5. Test with all applicable products
  6. Ensure outputs go to the output/ directory

Archived Scripts

Deprecated scripts are moved to archive/ subdirectories. These scripts are kept for reference but should not be used in active workflows.