This document provides context for the AI assistant to understand the structure, conventions, and purpose of this codebase.
This is a personal website and blog built with React, TypeScript, and Vite. It features interactive 3D elements using three.js and react-three-fiber, and technical articles written in MDX.
- Frontend: A single-page application built with React and TypeScript, styled with Material-UI.
- Routing: Client-side routing is handled by
react-router-dom. - Blog:
- Content is written in
.mdxfiles insrc/content/notes/. - Supports LaTeX math (via
rehype-katex). - Supports executable Python code blocks in the browser (via
react-py/ WebAssembly).
- Content is written in
- 3D Graphics:
src/components/ModelViewer.tsxdisplays.glbmodels. - Deployment: The site is deployed to GitHub Pages via a GitHub Actions workflow defined in
.github/workflows/deploy.yml.
src/main.tsx: Entry point, wraps the app inBrowserRouter.src/App.tsx: Defines the routes (/,/notes,/notes/:slug).src/pages/: Top-level page components (Home, NotesList, NoteView).src/components/PythonREPL.tsx: A component that runs Python code in the browser using WASM.
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Build for production:
npm run build
-
Linting:
npm run lint
- Styling: Material-UI for components. Custom CSS for code highlighting and math.
- Content: To add a new blog post, create a
.mdxfile insrc/content/notes/and add an entry to the list insrc/pages/NotesList.tsx.