# Quick Reference - After Redesign ## TL;DR - What You Need to Know **Edit:** `content/` folder **Build:** `./rebuild.sh` **Test:** Ctrl+F5 in browser **Done:** Changes appear ✓ --- ## File Locations | What | Where | Can I Edit? | |------|-------|------------| | Markdown content | `content/section/index.md` | YES ✓ | | Blog posts | `content/blog/post-name.md` | YES ✓ | | Images/PDFs | `content/section/file.pdf` | YES ✓ | | Equations Library | `lib/equations.json` | YES ✓ | | Generated JSON | `public/section/index.json` | NO ✗ | | Main page | `index.php` | Rarely | --- ## Daily Workflow ```bash # 1. Edit a file nano content/german/index.md # 2. Add an image/PDF (if needed) cp ~/Downloads/image.png content/german/ # 3. Add/Edit an equation (if needed) nano lib/equations.json # 4. Rebuild everything ./rebuild.sh # 5. Refresh browser # Ctrl+F5 or Cmd+Shift+R ``` --- ## Common Tasks ### Add a New Blog Post ```bash echo "# My New Post This is great content!" > content/blog/my-new-post.md ./rebuild.sh # Refresh browser, done! ``` ### Add an Image to a Section ```bash # Copy image to content folder cp ~/image.jpg content/german/ # Reference in markdown # ![My Image](/content/german/image.jpg) nano content/german/index.md ./rebuild.sh ``` ### Add a PDF Link ```bash # Copy PDF to content folder cp ~/document.pdf content/german/ # Reference in markdown # [Download PDF](/content/german/document.pdf) nano content/german/index.md ./rebuild.sh ``` ### Create a New Section ```bash # Create folder mkdir content/mysection # Create markdown echo "# My Section" > content/mysection/index.md # Rebuild ./rebuild.sh # Appears in sidebar automatically! ``` ### Add a New Equation ```bash # Edit the equations library JSON nano lib/equations.json # Add a new entry following the existing structure. # Example: E=mc² (see EQUATION_VISUALIZER.md for details) # Rebuild ./rebuild.sh # New equation will appear in the sidebar dropdown! ``` --- ## Commands Quick Ref ```bash # Rebuild site ./rebuild.sh # Start auto-watcher (optional) nohup php watch.php > watch.log 2>&1 & # Stop auto-watcher pkill -f "php watch.php" # View logs tail watch.log # List all markdown find content -name "*.md" # List all assets find content -type f ! -name "*.md" ``` --- ## Structure at a Glance ``` content/ ← EDIT HERE ├── home/index.md ├── blog/ │ ├── post1.md │ └── post2.md ├── german/ │ ├── index.md ← Content │ └── *.pdf, *.png ← Assets └── ... public/ ← AUTO-GENERATED ├── home/index.json ├── blog/post1.json ├── german/index.json └── ... lib/equations.json ← Equation definitions (EDIT THIS) index.php ← Loads JSON from public/ rebuild.sh ← Generates public/ from content/ equation-visualizer.html ← Displays equations from lib/equations.json ``` --- ## If Something Goes Wrong | Problem | Solution | |---------|----------| | Changes not showing | Run `./rebuild.sh` again | | Browser still shows old | Ctrl+F5 hard refresh | | Assets not loading | Check they're in `content/section/` | | JSON looks wrong | Delete `public/` and run `./rebuild.sh` | | Need to revert | Restore from `_OLD_BACKUP/` | | Equation not appearing | Check `lib/equations.json` syntax | --- ## Asset References in Markdown Reference assets with their **web path**, not file path: ```markdown # ✓ CORRECT ![Image](/content/german/image.png) [PDF](/content/german/document.pdf) # ✗ WRONG ![Image](image.png) ![Image](/german/image.png) ``` --- ## Important Rules 1. **EDIT:** `content/` folder for content, `lib/equations.json` for equations 2. **DON'T EDIT:** `public/` folder (it gets overwritten) 3. **ASSETS:** Go in `content/section/` with markdown 4. **AFTER EDIT:** Run `./rebuild.sh` 5. **AFTER BUILD:** Refresh browser (Ctrl+F5) --- ## What the System Does ``` You edit content/blog/post.md OR lib/equations.json ↓ You run ./rebuild.sh ↓ generate_json.php reads markdown & equations.json ↓ Converts to HTML/JSON (as appropriate) ↓ Writes to public/blog/post.json (for content) ↓ Browser loads public/blog/post.json AND lib/equations.json ↓ index.php renders it and equation-visualizer.html activates ↓ User sees your content and interactive equations! ``` --- ## Auto-Watch (Optional) If you want automatic rebuilding as you edit: ```bash # Start in background nohup php watch.php > watch.log 2>&1 & # Then just edit files, they auto-rebuild! # Stop with: pkill -f "php watch.php" ``` --- ## Documentation Files - **QUICK_START.md** - You are here! - **REDESIGN_COMPLETE.md** - Full details of what changed - **OPERATIONS.md** - Detailed maintenance guide - **ARCHITECTURE_REDESIGN.md** - Technical details - **EQUATION_VISUALIZER.md** - How to use the new visualizer --- ## Remember - You only need to edit files in `content/` or `lib/equations.json` - Everything else is automatic - No database - No complex routing - Just simple, clean markdown and JSON for interactivity **You've got this!** 🎉