This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
| Command | Description |
|---|---|
npm install |
Install dependencies |
npm run dev |
Start local development server at localhost:4321 |
npm run build |
Build production site to ./dist/ |
npm run preview |
Preview build locally |
npm run generate |
Run generator script to create content from external repos |
npm test |
Run test suite using tsx |
npx playwright install --with-deps chromium |
Install Playwright with Chromium for testing |
The site generator requires external repositories to be cloned and referenced via environment variables:
export AEP_LOCATION="../aeps" # Main AEP documentation repo
export AEP_LINTER_LOC="../api-linter" # API linter rules repo
export AEP_COMPONENTS_LOC="../aep-components" # Components repo
npm run generate
npm run devUse ./scripts/serve.sh as a convenience script if repos are in sibling directories.
This is a two-stage site generator built on Astro and Starlight:
- Reads documentation from multiple external repos (aeps, api-linter, aep-components)
- Transforms AEP content (formatted as Markdown with Jinja2) and custom syntax into MDX
- Generates sidebar configuration and navigation
- Outputs processed files to
src/content/docs/andgenerated/
- Standard Astro/Starlight setup with custom components
- Reads generated MDX files and JSON configuration
- Produces static site with navigation, search, and theming
Generator Scripts (scripts/src/):
generate.ts- Main orchestration scriptmarkdown.ts- Markdown transformation pipeline with custom syntax handlingsidebar.ts- Navigation structure generationtypes.ts- TypeScript definitions for AEPs, configs, and content
Astro Components (src/components/):
Sample.astro- Code sample rendering with syntax highlightingAepList.astro- Dynamic AEP listing by categoryHomeGrid.astro- Homepage layout gridoverrides/- Custom Starlight component overrides
Content Processing:
- Converts Jinja2 templates (
aep.md.j2) to MDX - Transforms custom syntax (tabs, callouts, samples) to Starlight components
- Processes AEP metadata from YAML frontmatter
- Generates redirects and cross-references
src/content/docs/- All site content (generated, not edited directly)generated/- JSON files for sidebar, redirects, and configurationpublic/json-schema/- Generated JSON schemas from components repo
astro.config.mjs- Astro configuration with Starlight pluginsscripts/generate.ts- Main generator that processes external repossrc/content.config.ts- Content collection schema with AEP extensionstailwind.config.mjs- Tailwind CSS configuration
Run tests with npm test. Tests use a custom test runner and cover:
- Sample code extraction and formatting
- YAML processing with JSONPath queries
- Error handling for invalid content
- Clone external repos (aeps, api-linter, aep-components)
- Run
npm run generateto process all content - Generator reads YAML configs and Jinja2 templates
- Transforms content through markdown pipeline
- Outputs MDX files and JSON configs
- Generates
public/llms.txtwith all AEP contents for LLM consumption - Astro builds static site from generated content
src/content/docs/- Site content (MDX files)generated/- JSON configuration files (sidebar, redirects, etc.)public/llms.txt- Consolidated AEP content for LLM training/referencepublic/json-schema/- JSON schemas from components repo