hypergen-starlight
v0.1.1
Published
Hypergen pack for creating Astro/Starlight documentation sites with TypeDoc integration
Downloads
6
Maintainers
Readme
Hypergen Starlight Pack
A comprehensive Hypergen pack for creating beautiful Astro/Starlight documentation sites with TypeDoc integration and modern development features.
Features
- 🚀 Astro/Starlight: Modern static site generator optimized for documentation
- 📖 TypeDoc Integration: Automatic API documentation generation from TypeScript
- 🔍 Full-text Search: Built-in search functionality
- 📱 Mobile Friendly: Responsive design that works on all devices
- 🎨 Beautiful UI: Clean, modern design with dark mode support
- 🔗 Link Validation: Automatic internal link validation
- 🖼️ Image Zoom: Click to zoom functionality for images
- 📋 OpenAPI Support: Interactive API documentation from OpenAPI/Swagger specs
- 🤖 AI Ready: Generates llms.txt for AI consumption
- ⌨️ Keyboard Shortcuts: Optional keyboard navigation support
- 📂 Auto Sidebar: Automatic sidebar generation option
- ↗️ Scroll to Top: Convenient scroll to top button
- 📝 Changelog Support: Built-in changelog documentation
- 🧠 Obsidian Integration: Optional Obsidian vault integration
Installation
# Install the pack
npm install -g hypergen-starlight
# Or use directly with hypergen
hypergen install hypergen-starlightUsage
# Create a new documentation site
hypergen starlight create --projectName="My Project" --projectDescription="My awesome project documentation"
# With all options
hypergen starlight create \
--projectName="My API" \
--projectDescription="Complete API documentation and guides" \
--projectFolder="my-api-docs" \
--siteUrl="https://docs.myapi.com" \
--githubRepo="https://github.com/myorg/my-api" \
--enableTypedoc=true \
--entryPoint="src/index.ts" \
--enableOpenAPI=true \
--enableKeyboardShortcuts=true \
--enableAutoSidebar=true \
--enableScrollToTop=true \
--enableChangelogs=false \
--enableObsidian=falseTemplate Variables
| Variable | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
| projectFolder | string | No | "my-docs-site" | Project folder name |
| projectName | string | Yes | - | Project name for the documentation site |
| projectDescription | string | Yes | - | Project description |
| siteUrl | string | No | "https://localhost:4321" | Site URL |
| githubRepo | string | No | - | GitHub repository URL |
| enableTypedoc | boolean | No | true | Enable TypeDoc API documentation |
| entryPoint | string | No | "src/index.ts" | TypeScript entry point for API docs |
| enableOpenAPI | boolean | No | false | Enable OpenAPI/Swagger documentation |
| enableKeyboardShortcuts | boolean | No | false | Enable keyboard shortcuts |
| enableAutoSidebar | boolean | No | false | Enable automatic sidebar generation |
| enableScrollToTop | boolean | No | true | Enable scroll-to-top button |
| enableChangelogs | boolean | No | false | Enable changelog documentation |
| enableObsidian | boolean | No | false | Enable Obsidian vault integration |
Generated Structure
my-docs-site/
├── README.md # Project README
├── package.json # Dependencies and scripts
├── astro.config.mjs # Astro configuration
├── tailwind.config.mjs # Tailwind CSS configuration
├── openapi.yaml # OpenAPI specification (optional)
└── src/
└── content/
├── config.ts # Content collection configuration
└── docs/
├── index.mdx # Homepage
├── introduction.mdx
├── installation.mdx
├── quick-start.mdx
└── features/
└── core.mdxDevelopment
After generating your documentation site:
cd my-docs-site
npm install
npm run dev # Start development server
npm run build # Build for productionCustomization
- Edit
astro.config.mjsto modify site configuration - Customize the sidebar in the
starlightSidebarTopicsplugin configuration - Add new pages by creating
.mdxfiles insrc/content/docs/ - Modify styling by editing
tailwind.config.mjs - Update
openapi.yamlwith your API specification
Pack Configuration
This pack includes a hypergen-pack.config.js file that defines:
- Template engine preferences (Liquid)
- Pack metadata and author information
- Template directory structure
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
