|
| 1 | +# Project Context: Mario Lavanga's Personal Website (v2) |
| 2 | + |
| 3 | +## Overview |
| 4 | +This project contains the source code for the personal academic and professional website of **Mario Lavanga**. |
| 5 | + |
| 6 | +**Current Status (Nov 2025):** |
| 7 | +The website has been migrated from **Jekyll** to **Next.js**. |
| 8 | +* **Root**: The new Next.js application (v2). |
| 9 | +* **`v_old/`**: The legacy Jekyll application (v1), preserved for reference. |
| 10 | + |
| 11 | +## Architecture & Technologies (New Site) |
| 12 | +* **Framework**: [Next.js 16](https://nextjs.org/) (App Router). |
| 13 | +* **Language**: TypeScript. |
| 14 | +* **Styling**: Tailwind CSS 4. |
| 15 | +* **Deployment**: GitHub Pages (Static Export). |
| 16 | +* **CI/CD**: GitHub Actions (`.github/workflows/nextjs.yml`). |
| 17 | + |
| 18 | +## Directory Structure |
| 19 | +* **`app/`**: Main Next.js application code (components, pages, data). |
| 20 | + * `components/`: Reusable UI components (Hero, Navbar, ProjectCard, etc.). |
| 21 | + * `data/`: Content files (e.g., `content.ts`) replacing the old `_config.yml`. |
| 22 | +* **`public/`**: Static assets (images, SVGs). |
| 23 | +* **`v_old/`**: The complete legacy Jekyll codebase. |
| 24 | +* **`old_content/`**: Backup of raw markdown content/config from the legacy site. |
| 25 | + |
| 26 | +## Development Workflow |
| 27 | + |
| 28 | +### 1. Managing the New Site (Next.js) |
| 29 | +The site runs on **Port 3000**. Use the helper script `serve.sh` to manage the background process. |
| 30 | + |
| 31 | +* **Start**: `./serve.sh start` |
| 32 | +* **Stop**: `./serve.sh stop` |
| 33 | +* **Status**: `./serve.sh status` |
| 34 | +* **Logs**: `./serve.sh logs` (or `tail -f next.log`) |
| 35 | + |
| 36 | +*Standard Method*: `npm run dev` |
| 37 | + |
| 38 | +### 2. Managing the Legacy Site (Jekyll) |
| 39 | +The legacy site runs on **Port 4000**. Use the helper script `serve_old.sh` (which wraps the old `serve.sh` inside `v_old`). |
| 40 | + |
| 41 | +* **Start**: `./serve_old.sh start` |
| 42 | +* **Stop**: `./serve_old.sh stop` |
| 43 | +* **Status**: `./serve_old.sh status` |
| 44 | +* **Logs**: `./serve_old.sh logs` (or `tail -f v_old/jekyll.log`) |
| 45 | + |
| 46 | +**Note:** Ensure Port 4000 is free before starting the legacy site. |
| 47 | + |
| 48 | +### 3. Deployment |
| 49 | +The site is deployed automatically to GitHub Pages via GitHub Actions. |
| 50 | +* **Trigger**: Push to `master` or `main`. |
| 51 | +* **Config**: `.github/workflows/nextjs.yml`. |
| 52 | +* **Build Mode**: Static Export (`output: 'export'` in `next.config.ts`). |
| 53 | + |
| 54 | +## Key Configuration Files |
| 55 | +* **`next.config.ts`**: Configures static export and image optimization settings for GitHub Pages. |
| 56 | +* **`tailwind.config.ts`** (or internal theme): Configures the design system. |
| 57 | +* **`app/data/content.ts`**: Central file for editing website content (Bio, Experience, Projects, Publications). This replaces Jekyll's `_config.yml`. |
| 58 | + |
| 59 | +## Migration Notes |
| 60 | +* The legacy content has been ported to `app/data/content.ts`. |
| 61 | +* New features should be developed in the Next.js app (`app/`). |
| 62 | +* The `v_old` directory is frozen and should typically not be modified unless necessary for historical reference. |
0 commit comments