### Changes:
1. **Created content directories**:
- `src/content/homepage/{zh,en}/hero.md` - Homepage content
- `src/content/product/{xstream,xcloudflow,xscopehub}/{zh,en}/hero.md` - Product content
2. **Content generation script**:
- `scripts/generate-content.ts` - Compiles markdown to JSON
- Uses js-yaml for proper YAML parsing
- Generates JSON files in `src/data/content/`
3. **Content loader**:
- `src/lib/content-loader.ts` - Loads content from JSON files
- No longer uses `fs` module (client-side compatible)
- Supports homepage and product content
4. **Updated homepage component**:
- `src/modules/homepage/page.tsx` - Now uses content loader
- Removed hardcoded heroContent object
- Content separated from logic and styling
### Result:
✅ Content separated from code
✅ Markdown format for easy editing
✅ Layout and logic unchanged
✅ Build succeeds with 120 static pages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| dev | ||
| gen-runtime-config.sh | ||
| generate-content.ts | ||
| setup_node.sh | ||
| start.js | ||
| sync-content.sh | ||