Scripts Collection Documentation
This directory contains the VitePress documentation site for the scripts collection.
Development
bash
# Install dependencies
npm install
# Generate documentation from scripts
npm run generate
# Start development server
npm run docs:dev
# Build for production
npm run docs:build
# Preview production build
npm run docs:previewHow It Works
- Automatic Scanning: The
scripts/generate-docs.jsscript scans all category folders (frontend, backend, git, node) - Metadata Extraction: It extracts titles, descriptions, and usage instructions from script comments
- Page Generation: Creates a markdown page for each script with syntax-highlighted code
- Sidebar Updates: Automatically updates the VitePress sidebar configuration
- Deployment: GitHub Actions builds and deploys to GitHub Pages on release branch updates
Adding New Scripts
- Add your script to the appropriate category folder (frontend, backend, git, or node)
- Include descriptive comments at the top of your file
- Optionally add a USAGE INSTRUCTIONS section in comments
- Push to the release branch - documentation will be auto-generated and deployed
Manual Regeneration
If you want to regenerate the documentation manually:
bash
npm run generateThis will rescan all scripts and update the documentation pages.