A modern documentation site built with Docusaurus, featuring MDX support for interactive React components.
- 📝 MDX Support - Write React components directly in Markdown
- 🎨 Custom Components - Reusable components like ApiEndpoint for API docs
- 🌙 Dark Mode - Built-in dark mode support
- 📱 Responsive - Mobile-friendly design
- ⚡ Fast - Optimized build with code splitting
- 🔍 Search Ready - Compatible with Algolia DocSearch
- 🐳 Docker & Kubernetes - Production-ready container support with Helm charts
- 🚀 CI/CD Ready - GitHub Actions workflows for automated builds and deployments
- 🔒 Security Scanned - Automated vulnerability scanning with Trivy
- 📦 Multi-Platform - Docker images for AMD64 and ARM64
documentation-site/
├── docs/ # Documentation content (MDX/Markdown)
│ ├── intro.md # Landing page
│ ├── getting-started/ # Getting started guides
│ ├── api-reference/ # API documentation
│ └── guides/ # Tutorials and guides
├── src/
│ ├── components/ # Custom React components
│ │ └── ApiEndpoint/ # API endpoint display component
│ ├── css/ # Global styles
│ └── pages/ # Custom pages
├── static/ # Static assets (images, files)
├── docusaurus.config.ts # Main configuration
├── sidebars.ts # Sidebar navigation
└── package.json # Dependencies and scripts
- Node.js 20+ (installed via nvm)
- npm 10+
Dependencies are already installed. If you need to reinstall:
npm installQuick Start (Easiest):
./devThis automatically loads the correct Node.js version and starts the dev server at http://localhost:3000
With Custom Port:
./dev -- --port 3002Alternative (using npm):
npm start # Uses run.sh wrapper to load nvm automatically
npm start -- --port 3002 # Custom portThe npm scripts now automatically load Node.js 20 via the run.sh wrapper, so you don't need to manually source nvm!
Create a production build:
npm run buildThe static files will be generated in the build/ directory.
Test the production build locally:
npm run serveCreate an MDX file in the docs/ directory:
---
sidebar_position: 1
title: My Page Title
---
# My Page Title
Your content here...Import and use the ApiEndpoint component in your MDX files:
import ApiEndpoint from "@site/src/components/ApiEndpoint";
<ApiEndpoint
method="GET"
path="/api/v1/users"
description="Retrieve a list of all users"
/>Add syntax-highlighted code blocks:
```javascript title="example.js"
const response = await fetch("/api/endpoint");
const data = await response.json();
```Use built-in admonitions:
:::tip
This is a helpful tip!
:::
:::warning
Be careful with this!
:::
:::danger
This is dangerous!
:::Edit docusaurus.config.ts to customize:
- Site title and tagline
- URL and base URL
- GitHub organization/project
- Navbar and footer
- Theme colors
Edit sidebars.ts to customize navigation:
- Auto-generated (current setup)
- Manual sidebar structure
- Multiple sidebars
Customize in src/css/custom.css:
:root {
--ifm-color-primary: #2e8555;
/* More color variables... */
}The project includes full Docker and Kubernetes support with automated CI/CD pipelines.
Quick Start with Docker:
# Development with hot-reload
docker-compose up dev
# Access at http://localhost:3000
# Production with nginx
docker-compose up prod
# Access at http://localhost:8080Using Makefile:
make build-prod # Build production image
make run-prod # Run production container
make test # Test the imageSee detailed documentation:
Deploy to Kubernetes cluster:
# Install with Helm
helm install documentation-site ./helm/documentation-site \
-f helm/documentation-site/values-prod.yaml \
--namespace docs \
--create-namespace
# Using Makefile
make helm-install-
Update
docusaurus.config.tswith your GitHub details -
Set environment variable:
export GIT_USER=your-username -
Deploy:
npm run deploy
- Push to GitHub
- Import repository at vercel.com
- Vercel auto-detects Docusaurus
- Click "Deploy"
- Push to GitHub
- Import at netlify.com
- Build settings:
- Build command:
npm run build - Publish directory:
build
- Build command:
npm start # Start development server
npm run build # Create production build
npm run serve # Serve production build
npm run clear # Clear cache
npm run deploy # Deploy to GitHub PagesFor auto-generated API docs from OpenAPI specs:
npm install docusaurus-plugin-openapi-docs docusaurus-theme-openapi-docsAdd Algolia DocSearch or local search plugin for search functionality.
Create versioned documentation:
npm run docusaurus docs:version 1.0.0- Create a new branch
- Make your changes
- Test locally with
npm start - Build to verify:
npm run build - Submit a pull request
ISC