React-based documentation site with Bootstrap Darkly theme, deployed to GitHub Pages.
- React 18 with HashRouter for GitHub Pages compatibility
- Bootstrap Darkly theme from Bootswatch
- esbuild for fast builds and small bundles
- ESLint with Airbnb config for code quality
- Vitest and React Testing Library for testing
- GitHub Actions for automatic deployment
# Install dependencies
npm install
# Start dev server (http://localhost:3000)
npm run dev
# Run tests
npm test
# Run linter
npm run lint
# Format code
npm run format
# Build for production
npm run buildsite/
├── public/ # Static assets
├── src/
│ ├── components/ # React components
│ │ └── Layout/ # Header, Footer, Layout
│ ├── pages/ # Route pages
│ ├── styles/ # CSS files
│ ├── App.jsx # Main app component
│ └── main.jsx # Entry point
├── tests/ # Test files
├── scripts/ # Build scripts
└── package.json
- esbuild handles bundling and transpilation
- Hash routing (
#/) for GitHub Pages compatibility - Code splitting for optimal loading
- Bootstrap Darkly theme included
The site automatically deploys to GitHub Pages when changes are pushed to the main branch (in the site/ directory). The GitHub Actions workflow:
- Installs dependencies
- Builds the site
- Deploys to
gh-pagesbranch
- Create new page components in
src/pages/ - Add routes in
src/App.jsx - Update navigation in
src/components/Layout/Header.jsx - Follow SOLID principles (keep files under 300 lines)
- ESLint enforces Airbnb style guide
- Prettier for consistent formatting
- Accessibility (WCAG 2.1 AA) compliance
- Vitest for unit and integration testing
Using Bootswatch Darkly theme with Bootstrap 5:
- Dark background (#222)
- Primary blue (#375a7f)
- Clean, modern aesthetic
- Fully responsive
- Bundle size: ~300KB gzipped
- First Contentful Paint: < 1.5s
- Lighthouse score target: 90+