Installation
Get your documentation site running in under 5 minutes.
Prerequisites
- Node.js 18+ or Bun 1.0+
- Git for version control
- A code editor (VS Code recommended)
Step 1: Clone the Repository
git clone https://github.com/your-org/documentation-template.git my-docs
cd my-docs
Step 2: Install Dependencies
Using Bun (recommended for speed):
bun install
Or using npm:
npm install
Step 3: Environment Setup
Create your environment file:
cp .env.example .env
The default .env works out of the box:
# Points to your content directory
DATA_DIR=./dynamic_data
# Production URL (update for deployment)
SITE_URL=http://localhost:4321
Step 4: Start Development
bun run dev
Open http://localhost:4321 in your browser.
Verifying Installation
You should see:
- Homepage with hero section
- Navigation with Docs and Blog links
- Sample documentation in the sidebar
Available Commands
| Command | Description |
|---|---|
bun run dev |
Start dev server with hot reload |
bun run build |
Build production site to dist/ |
bun run preview |
Preview production build locally |
Troubleshooting
Port Already in Use
The server automatically finds an available port. Check terminal output for the actual URL.
Module Not Found Errors
# Clear node_modules and reinstall
rm -rf node_modules bun.lockb
bun install
Build Fails
Common causes:
- Missing
XX_prefix on doc files (required) - Invalid YAML frontmatter
- Broken imports in MDX files
Check the error message for the specific file and line number.
Next Steps
Continue to Configuration to customize your site.