|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +This is the official documentation site for daily.dev, built using Docusaurus 3. It serves as a comprehensive resource for daily.dev users covering features, guides, and community information. |
| 8 | + |
| 9 | +## Development Commands |
| 10 | + |
| 11 | +### Local Development |
| 12 | +```bash |
| 13 | +npm start # Start development server at localhost:3000 |
| 14 | +npm run build # Build for production |
| 15 | +npm run serve # Serve built site locally |
| 16 | +npm run clear # Clear Docusaurus cache |
| 17 | +``` |
| 18 | + |
| 19 | +### Docker Development |
| 20 | +```bash |
| 21 | +npm run docker:compose # Build and run with docker-compose |
| 22 | +npm run docker:run # Run pre-built image |
| 23 | +``` |
| 24 | + |
| 25 | +## Architecture |
| 26 | + |
| 27 | +### Core Framework |
| 28 | +- **Docusaurus 3**: Static site generator with React-based theming |
| 29 | +- **React 18**: Component framework |
| 30 | +- **MDX**: Markdown with JSX support for interactive documentation |
| 31 | + |
| 32 | +### Key Configuration Files |
| 33 | +- `docusaurus.config.js`: Main site configuration including navbar, footer, plugins, and theme settings |
| 34 | +- `sidebars.js`: Documentation sidebar structure (auto-generated from docs folder) |
| 35 | +- `src/pages/index.js`: Custom homepage component |
| 36 | +- `src/css/custom.css`: Global styles and theming |
| 37 | + |
| 38 | +### Content Structure |
| 39 | +- `docs/`: All documentation markdown files organized by category |
| 40 | +- `static/`: Static assets (images, icons, etc.) |
| 41 | +- `src/components/`: React components for homepage and custom elements |
| 42 | +- `src/pages/`: Custom pages outside the docs structure |
| 43 | + |
| 44 | +### Important Features |
| 45 | +- **Algolia Search**: Integrated search functionality |
| 46 | +- **Dark Mode**: Default dark theme with light mode toggle |
| 47 | +- **Image Optimization**: @docusaurus/plugin-ideal-image for responsive images |
| 48 | +- **Analytics**: Google Analytics integration |
| 49 | +- **Edit Links**: Direct GitHub edit links for all documentation |
| 50 | + |
| 51 | +### Content Categories |
| 52 | +The documentation is organized into main categories: |
| 53 | +- Getting Started |
| 54 | +- Key Features |
| 55 | +- Setting Up Your Feed |
| 56 | +- Customization |
| 57 | +- Squads |
| 58 | +- Plus Features |
| 59 | +- Monetization |
| 60 | +- Community |
| 61 | +- Your Profile |
| 62 | +- For Content Creators |
| 63 | +- For OSS Contributors |
| 64 | + |
| 65 | +## Development Notes |
| 66 | + |
| 67 | +### Adding New Documentation |
| 68 | +- Create `.md` files in appropriate `docs/` subdirectories |
| 69 | +- Use `_category_.json` files to configure category metadata |
| 70 | +- Sidebar is auto-generated from folder structure |
| 71 | + |
| 72 | +### Component Development |
| 73 | +- Homepage components are in `src/components/homepage/` |
| 74 | +- Feature components follow React functional component patterns |
| 75 | +- CSS modules are used for component styling |
| 76 | + |
| 77 | +### Asset Management |
| 78 | +- Icons and images should be placed in `static/img/` |
| 79 | +- Use SVG format for icons when possible |
| 80 | +- Images are optimized automatically by the ideal-image plugin |
| 81 | + |
| 82 | +### Deployment |
| 83 | +- Production builds are generated in `build/` directory |
| 84 | +- Site is configured for deployment to docs.daily.dev |
| 85 | +- Vercel configuration is available in `vercel.json` |
0 commit comments