|
| 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 VoidRunner.dev website - a Hugo-based static site for the VoidRunner AI-Powered Serverless Development Platform. The site uses the `hugo-saasify-theme` as a git submodule and is deployed to Cloudflare Pages. |
| 8 | + |
| 9 | +## Development Commands |
| 10 | + |
| 11 | +### Local Development |
| 12 | +```bash |
| 13 | +# Start development server with drafts enabled |
| 14 | +npm run dev |
| 15 | +# Alternative: hugo server -D --disableFastRender |
| 16 | + |
| 17 | +# Start development server accessible from network |
| 18 | +hugo server -D --bind 0.0.0.0 --baseURL http://localhost:1313 |
| 19 | +``` |
| 20 | + |
| 21 | +### Building |
| 22 | +```bash |
| 23 | +# Production build |
| 24 | +npm run build |
| 25 | +# Alternative: hugo --minify --gc --cleanDestinationDir |
| 26 | + |
| 27 | +# Preview build (with relative URLs) |
| 28 | +npm run build:preview |
| 29 | + |
| 30 | +# Clean build artifacts |
| 31 | +npm run clean |
| 32 | +``` |
| 33 | + |
| 34 | +### Dependencies |
| 35 | +```bash |
| 36 | +# Install npm dependencies (PostCSS, Tailwind CSS) |
| 37 | +npm install |
| 38 | + |
| 39 | +# Update git submodules (theme) |
| 40 | +git submodule update --init --recursive |
| 41 | + |
| 42 | +# Security audit |
| 43 | +npm run security-audit |
| 44 | + |
| 45 | +# Update dependencies |
| 46 | +npm run update-deps |
| 47 | +``` |
| 48 | + |
| 49 | +## Architecture & Structure |
| 50 | + |
| 51 | +### Hugo Configuration |
| 52 | +- **Main config**: `config.yaml` contains all site configuration, including theme settings, menu structure, and deployment parameters |
| 53 | +- **Theme**: Uses `hugo-saasify-theme` as a git submodule in `themes/` directory |
| 54 | +- **Content structure**: Organized with content types for blog, features, pricing, and docs |
| 55 | + |
| 56 | +### Content Management |
| 57 | +- **Homepage**: `content/_index.md` |
| 58 | +- **Features**: `content/features/_index.md` and individual feature pages |
| 59 | +- **Pricing**: `content/pricing/_index.md` |
| 60 | +- **Blog**: Individual `.md` files in `content/blog/` |
| 61 | +- **Docs**: Documentation pages in `content/docs/` |
| 62 | + |
| 63 | +### Asset Management |
| 64 | +- **Static assets**: Place in `static/` directory (copied as-is to `public/`) |
| 65 | +- **Images**: Organized in `static/images/` with subdirectories for blog, company, logos, social |
| 66 | +- **Headers/Redirects**: Cloudflare-specific files in `static/_headers` and `static/_redirects` |
| 67 | + |
| 68 | +### Styling System |
| 69 | +- **Framework**: TailwindCSS configured via `themes/hugo-saasify-theme/tailwind.config.js` |
| 70 | +- **Custom colors**: Primary (blue tones) and secondary (purple tones) color palettes |
| 71 | +- **Typography**: Inter for body text, Plus Jakarta Sans for headings |
| 72 | +- **PostCSS**: Configured for Tailwind processing and autoprefixer |
| 73 | + |
| 74 | +## Deployment |
| 75 | + |
| 76 | +### Automatic Deployment |
| 77 | +- **Trigger**: Push to `main` branch |
| 78 | +- **Platform**: Cloudflare Pages via GitHub Actions |
| 79 | +- **Workflow**: `.github/workflows/deploy.yml` |
| 80 | +- **Build command**: `hugo --minify --gc --cleanDestinationDir` |
| 81 | +- **Hugo version**: 0.134.3 (extended) |
| 82 | +- **Node version**: 22 |
| 83 | + |
| 84 | +### Manual Deployment |
| 85 | +```bash |
| 86 | +# Using Wrangler CLI |
| 87 | +npx wrangler pages deploy public |
| 88 | +``` |
| 89 | + |
| 90 | +### Environment Configuration |
| 91 | +- **Production**: `HUGO_ENV=production`, `HUGO_BASEURL=https://voidrunner.dev` |
| 92 | +- **Preview**: `HUGO_ENV=development`, `HUGO_BASEURL=/` |
| 93 | +- **Required secrets**: `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID` |
| 94 | + |
| 95 | +## Key Integration Points |
| 96 | + |
| 97 | +### Theme Customization |
| 98 | +- Theme is a git submodule - avoid editing theme files directly |
| 99 | +- Use `layouts/` directory for template overrides |
| 100 | +- Custom partials go in `layouts/partials/` |
| 101 | +- SEO configuration in `layouts/partials/seo.html` |
| 102 | + |
| 103 | +### Content Types |
| 104 | +- **Blog posts**: Support tags, categories, authors taxonomy |
| 105 | +- **Features**: Individual feature pages with custom layout |
| 106 | +- **Permalinks**: Custom URL structure for blog (`/blog/:year/:month/:day/:slug/`) and features (`/features/:slug/`) |
| 107 | + |
| 108 | +### Performance & SEO |
| 109 | +- **Minification**: Enabled for HTML, CSS, JS, JSON, SVG, XML |
| 110 | +- **Image processing**: Lanczos resampling, 85% quality |
| 111 | +- **Security headers**: Configured via `static/_headers` for Cloudflare |
| 112 | +- **Analytics**: Google Analytics and GTM support configured |
| 113 | +- **Robots.txt**: Auto-generated with custom rules |
| 114 | + |
| 115 | +## Development Workflow |
| 116 | + |
| 117 | +### Making Changes |
| 118 | +1. **Content updates**: Edit markdown files in `content/` |
| 119 | +2. **Template changes**: Add overrides in `layouts/` (don't modify theme directly) |
| 120 | +3. **Styling**: Work with TailwindCSS classes, theme provides base configuration |
| 121 | +4. **Assets**: Add to `static/` directory, optimize images to WebP when possible |
| 122 | + |
| 123 | +### Testing |
| 124 | +- Always test locally with `hugo server -D` before deploying |
| 125 | +- Check both desktop and mobile responsiveness |
| 126 | +- Verify all links and images load correctly |
| 127 | +- Test build process with `npm run build` before pushing |
| 128 | + |
| 129 | +### Git Submodule Management |
| 130 | +- Theme updates: `git submodule update --remote themes/hugo-saasify-theme` |
| 131 | +- When cloning: Always use `git submodule update --init --recursive` |
| 132 | +- Submodule is tracked at specific commit - update deliberately |
| 133 | + |
| 134 | +## Performance Considerations |
| 135 | +- **Image optimization**: Convert to WebP, resize appropriately |
| 136 | +- **Build optimization**: Hugo's resource bundling and minification enabled |
| 137 | +- **CDN**: Cloudflare handles global distribution and caching |
| 138 | +- **Core Web Vitals**: Monitor via Lighthouse and PageSpeed Insights |
0 commit comments