# π Documentation Update Guide
This guide explains how to update the CodeGraphContext documentation website.
## ποΈ Documentation Structure
CodeGraphContext has **two separate web properties**:
### 1. **MkDocs Documentation** (Main Docs)
- **Location**: `/docs/`
- **URL**: https://CodeGraphContext.github.io/CodeGraphContext/
- **Purpose**: Technical documentation, guides, API reference
- **Technology**: MkDocs with Material theme
### 2. **React Landing Page** (Marketing Site)
- **Location**: `/website/`
- **URL**: https://codegraphcontext.vercel.app/ (or similar)
- **Purpose**: Marketing, features showcase, quick start
- **Technology**: React + Vite + TypeScript
---
## π Updating MkDocs Documentation
### Quick Start
```bash
cd docs
pip install mkdocs-material
mkdocs serve # Preview at http://127.0.0.1:8000
```
### File Structure
```
docs/
βββ mkdocs.yml # Configuration & navigation
βββ docs/ # Markdown content
β βββ index.md
β βββ installation.md
β βββ cookbook.md
β βββ ...
βββ deployment/ # Deployment guides (NEW!)
βββ README.md
βββ DOCKER_README.md
βββ ...
```
### Adding New Pages
1. **Create a markdown file** in `docs/docs/`:
```bash
touch docs/docs/my-new-page.md
```
2. **Add to navigation** in `docs/mkdocs.yml`:
```yaml
nav:
- My New Page: my-new-page.md
```
3. **Preview changes**:
```bash
cd docs && mkdocs serve
```
### Building & Deploying
```bash
cd docs
mkdocs build # Generates static site in docs/site/
mkdocs gh-deploy # Deploys to GitHub Pages
```
---
## π¨ Updating React Landing Page
### Quick Start
```bash
cd website
npm install
npm run dev # Preview at http://localhost:5173
```
### Key Files to Edit
- **`src/pages/Index.tsx`** - Main landing page
- **`src/components/HeroSection.tsx`** - Hero banner
- **`src/components/FeaturesSection.tsx`** - Features list
- **`src/components/InstallationSection.tsx`** - Installation guide
- **`src/components/Footer.tsx`** - Footer links (just updated!)
- **`src/components/CookbookSection.tsx`** - Code examples
### Building for Production
```bash
cd website
npm run build # Generates dist/ folder
```
---
## β
Recent Changes
### What We Just Did
1. β
Moved deployment docs from root to `docs/deployment/`
2. β
Updated `docs/mkdocs.yml` to include deployment section
3. β
Updated `website/src/components/Footer.tsx` to link to deployment docs
4. β
Created `docs/deployment/README.md` as navigation index
### Next Steps to Publish
1. **Test MkDocs locally**:
```bash
cd docs
mkdocs serve
# Visit http://127.0.0.1:8000 and check the "Deployment" section
```
2. **Deploy to GitHub Pages**:
```bash
cd docs
mkdocs gh-deploy
```
3. **Update React site** (if needed):
```bash
cd website
npm run build
# Deploy to Vercel/Netlify/etc.
```
---
## π Useful Links
- **MkDocs Documentation**: https://www.mkdocs.org/
- **Material Theme**: https://squidfunk.github.io/mkdocs-material/
- **Current Docs Site**: https://CodeGraphContext.github.io/CodeGraphContext/
---
## π‘ Tips
- **MkDocs** uses relative paths from `docs/docs/` directory
- Use `../deployment/FILE.md` to reference files outside `docs/docs/`
- The React site links to GitHub for docs (see Footer.tsx)
- TypeScript errors in `website/` are normal without `npm install`