Skip to content

Conversation

@anegg0
Copy link
Contributor

@anegg0 anegg0 commented Jan 15, 2026

Summary

Adds automated validation for sidebars.js to catch broken document references before they reach production.

Changes

  • New validation script (check-sidebar-links.ts): Validates all sidebar reference types (doc, link, category, html, autogenerated)
  • GitHub Action workflow: Runs automatically on PRs when sidebars or docs change
  • Handles Docusaurus conventions: Supports numbered prefixes (01-, 02-) and skips generated content

Usage

yarn check-sidebar-links

This setup identified broken links: I kept them to demo the feature, you can see how the GH action failed "perfectly".

✅ Validates 287 sidebar references in ~5-10 seconds
⚠️ Identifies 3 existing broken links that need fixing:
- for-devs/oracles/supra/supras-price-feed
- for-devs/oracles/supra/supras-vrf
- build-decentralized-apps/oracles/overview-oracles

- Validates all sidebar reference types (doc, link, category, html, autogenerated)
- Handles Docusaurus numbered prefixes for both files and directories
- Skips validation for generated content (SDK docs, Stylus examples)
- Provides clear error reporting with location information
- Triggers on PR and push to master when sidebar or docs change
- Uses Node.js 22.x and existing CI patterns
- Runs validation script with clear output
- Fast execution without expensive SDK compilation
- Enables local validation with 'yarn check-sidebar-links'
- Placed alongside other validation scripts
@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
arbitrum-docs Ready Ready Preview Jan 29, 2026 6:17pm

Request Review

@anegg0 anegg0 changed the title Ci navbar links Ci broken navbar links Jan 15, 2026
@anegg0 anegg0 requested a review from douglance January 15, 2026 19:14
anegg0 and others added 2 commits January 28, 2026 14:09
The validate-sidebar-links workflow was failing because sdk-sidebar.js
is a generated file (gitignored) that didn't exist in CI. The workflow
now initializes submodules and generates SDK docs before running the
link validation, matching the Vercel production build flow.

Changes:
- Enable recursive submodule checkout
- Add step to install SDK dependencies
- Add step to generate SDK docs via TypeDoc
The validate-sidebar-links workflow was failing because both sdk-sidebar.js
and stylus-by-example sidebar files are generated (gitignored) and didn't
exist in CI. The workflow now:

1. Initializes submodules (arbitrum-sdk, stylus-by-example)
2. Installs SDK dependencies
3. Syncs Stylus content to generate stylus-by-example sidebars
4. Generates SDK docs via TypeDoc to create sdk-sidebar.js
5. Validates sidebar links

This matches the Vercel production build flow and ensures all required
sidebar files exist before validation.

Changes:
- Enable recursive submodule checkout
- Add step to install SDK dependencies
- Add step to sync Stylus content
- Add step to generate SDK docs via TypeDoc
@anegg0
Copy link
Contributor Author

anegg0 commented Jan 29, 2026

Duplicate of 3041

@anegg0 anegg0 closed this Jan 29, 2026
@anegg0 anegg0 reopened this Jan 29, 2026
@anegg0
Copy link
Contributor Author

anegg0 commented Jan 29, 2026

Made redundant by: 3041

@anegg0 anegg0 closed this Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants