Skip to content

Commit a60e504

Browse files
refactor: Migrate to Native React + MDX architecture
Removed Jupyter Book and Python build dependencies. Integrated MDX for content and react-py for client-side Python execution. Updated routing and build workflow.
1 parent cf8edd1 commit a60e504

23 files changed

+2925
-1602
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,9 @@ jobs:
2323
with:
2424
node-version: '20'
2525

26-
- name: Set up uv
27-
uses: astral-sh/setup-uv@v1
28-
with:
29-
uv-version: '0.2.10'
30-
3126
- name: Install dependencies
3227
run: npm install
3328

34-
- name: Build Jupyter Book
35-
run: npm run build:book
36-
37-
- name: Copy Jupyter Book to public
38-
run: npm run copy:book
39-
4029
- name: Build Vite application
4130
run: npm run build
4231

GEMINI.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,50 @@
1-
# Gemini Code Context: `const-correctness.github.io`
1+
# Gemini Code Context: `constcorrectness.github.io`
22

33
This document provides context for the AI assistant to understand the structure, conventions, and purpose of this codebase.
44

55
## Project Overview
66

7-
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 hosts technical articles written in a Jupyter Book.
7+
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**.
88

9-
- **Frontend**: A single-page application built with React and TypeScript, styled with Material-UI. The main application logic is in `src/App.tsx`.
10-
- **3D Graphics**: The site includes a 3D model viewer (`src/components/ModelViewer.tsx`) that displays a `.glb` model.
11-
- **Blog Content**: The technical articles are managed in the `jupyter-books` directory. These are converted to HTML using Jupyter Book and served as part of the React application.
9+
- **Frontend**: A single-page application built with React and TypeScript, styled with Material-UI.
10+
- **Routing**: Client-side routing is handled by `react-router-dom`.
11+
- **Blog**:
12+
- Content is written in `.mdx` files in `src/content/notes/`.
13+
- Supports LaTeX math (via `rehype-katex`).
14+
- Supports executable Python code blocks in the browser (via `react-py` / WebAssembly).
15+
- **3D Graphics**: `src/components/ModelViewer.tsx` displays `.glb` models.
1216
- **Deployment**: The site is deployed to GitHub Pages via a GitHub Actions workflow defined in `.github/workflows/deploy.yml`.
1317

14-
## Building and Running the Project
18+
## Architecture
19+
20+
- **`src/main.tsx`**: Entry point, wraps the app in `BrowserRouter`.
21+
- **`src/App.tsx`**: Defines the routes (`/`, `/notes`, `/notes/:slug`).
22+
- **`src/pages/`**: Top-level page components (Home, NotesList, NoteView).
23+
- **`src/components/PythonREPL.tsx`**: A component that runs Python code in the browser using WASM.
1524

16-
The project uses `npm` for package management.
25+
## Building and Running the Project
1726

1827
- **Install dependencies**:
1928
```bash
2029
npm install
2130
```
2231

2332
- **Run the development server**:
24-
Starts the Vite dev server at `http://localhost:5173`.
2533
```bash
2634
npm run dev
2735
```
2836

2937
- **Build for production**:
30-
This command transpiles the TypeScript and builds the Vite project.
3138
```bash
3239
npm run build
3340
```
3441

35-
- **Build and serve the Jupyter Book**:
36-
The Jupyter Book content needs to be built and copied to the `public` directory to be accessible by the Vite application.
37-
```bash
38-
npm run build:book
39-
npm run copy:book
40-
```
41-
4242
- **Linting**:
43-
This project uses ESLint for code linting.
4443
```bash
4544
npm run lint
4645
```
4746

4847
## Development Conventions
4948

50-
- **Styling**: The project uses Material-UI for UI components. Styling is done via the `sx` prop.
51-
- **State Management**: Component-level state is managed with React hooks (`useState`).
52-
- **3D Models**: 3D models are stored in the `public/models` directory.
53-
- **Blog Posts**: Blog posts are written in Markdown (`.md`) or Jupyter Notebooks (`.ipynb`) in the `jupyter-books` directory. To create a new post, add a file to this directory and update the `_toc.yml` file.
54-
- **Proxy**: The Vite development server is configured with proxies in `vite.config.ts` to correctly serve the Jupyter Book content.
49+
- **Styling**: Material-UI for components. Custom CSS for code highlighting and math.
50+
- **Content**: To add a new blog post, create a `.mdx` file in `src/content/notes/` and add an entry to the list in `src/pages/NotesList.tsx`.

jupyter-books/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

jupyter-books/.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

jupyter-books/README.md

Whitespace-only changes.

jupyter-books/_config.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

jupyter-books/intro.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

jupyter-books/myst.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

jupyter-books/pyproject.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

jupyter-books/rendering-math.ipynb

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)