Skip to content

Commit aed1ce5

Browse files
authored
Migrate the blog to MDX using velite (#18)
* Migrate the blog to use mdx files Signed-off-by: Adam Gutglick <adam@spiraldb.com> * Use velite to render MDX posts Signed-off-by: Adam Gutglick <adam@spiraldb.com> * Solve a rendering issue, removing some akward line breaks Signed-off-by: Adam Gutglick <adam@spiraldb.com> * Change package manager to bun Signed-off-by: Adam Gutglick <adam@spiraldb.com> --------- Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 7b866cd commit aed1ce5

File tree

16 files changed

+1361
-4591
lines changed

16 files changed

+1361
-4591
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ yarn-error.log*
3939
# typescript
4040
*.tsbuildinfo
4141
next-env.d.ts
42+
43+
#velite generated files
44+
.velite
45+
public/static

CLAUDE.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Development Commands
66

7-
- `bun run dev` - Start development server with Turbopack
8-
- `bun run build` - Build production application
9-
- `bun run lint` - Run ESLint
7+
- `bun dev` - Start development server with Turbopack
8+
- `bun build` - Build production application
9+
- `bun lint` - Run ESLint
1010
- `bun start` - Start production server
1111

1212
## Architecture Overview
1313

1414
This is a Next.js 15 marketing website for Vortex, a columnar file format. The site features:
1515

1616
### Core Technologies
17+
1718
- **Next.js 15** with App Router and Turbopack for development
1819
- **React 19** with TypeScript
1920
- **TailwindCSS 4** for styling
@@ -22,21 +23,24 @@ This is a Next.js 15 marketing website for Vortex, a columnar file format. The s
2223
- **Vercel Analytics** for performance monitoring
2324

2425
### Visual System
26+
2527
- **3D Logo Animation**: WebGL-rendered GLTF model (`/public/logo.glb`) with ASCII art shader effect
2628
- **Interactive Mouse/Touch Controls**: Model rotates based on user interaction
2729
- **Responsive Design**: Different camera positions and sizing for mobile/desktop
2830
- **Custom Fonts**: Geist Sans, Geist Mono, and Funnel Display
2931

3032
### Component Structure
33+
3134
- `HeroASCII` - Main 3D logo component with WebGL rendering and ASCII conversion
3235
- `Overlay` - Text overlay on top of the 3D scene
3336
- Layout components (`Header`, `Footer`) wrap all pages
3437
- 404 page has its own hero variant (`hero-404`, `overlay-404`)
3538

3639
### Key Files
40+
3741
- `src/app/page.tsx` - Homepage with metadata for SEO
3842
- `src/components/hero/index.tsx` - Complex WebGL rendering with custom shaders
3943
- `src/app/layout.tsx` - Root layout with analytics providers and font loading
4044
- `next.config.ts` - Plausible proxy configuration
4145

42-
The site is optimized for performance with font optimization, analytics integration, and responsive WebGL rendering.
46+
The site is optimized for performance with font optimization, analytics integration, and responsive WebGL rendering.

README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,13 @@ This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-
22

33
## Getting Started
44

5-
First, install dependencies and run the development server:
5+
Start by install the [bun](https://bun.sh/) package manager.
66

7-
```bash
8-
npm install
9-
npm run dev
10-
```
11-
12-
or
13-
14-
```bash
15-
yarn install
16-
yarn dev
17-
```
18-
19-
or
7+
Then, install dependencies and run the development server:
208

219
```bash
22-
pnpm install
23-
pnpm dev
10+
bun install
11+
bun dev
2412
```
2513

2614
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
@@ -29,7 +17,7 @@ You can start editing the page by modifying `app/page.tsx`. The page auto-update
2917

3018
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
3119

32-
**Note:** The deployment is managed by `pnpm`, so any dependency change should be managed by it and reflected in `pnpm-lock.yaml`.
20+
**Note:** The deployment is managed by `bun`, so any dependency change should be managed by it and reflected in `bun.lock`.
3321

3422
## Learn More
3523

bun.lock

Lines changed: 1205 additions & 0 deletions
Large diffs are not rendered by default.

next.config.ts renamed to next.config.mjs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
import type { NextConfig } from "next";
21
import { withPlausibleProxy } from "next-plausible";
32

4-
const nextConfig: NextConfig = withPlausibleProxy()({
3+
// Start Velite automatically with Next.js (recommended approach)
4+
const isDev = process.argv.indexOf("dev") !== -1;
5+
const isBuild = process.argv.indexOf("build") !== -1;
6+
if (!process.env.VELITE_STARTED && (isDev || isBuild)) {
7+
process.env.VELITE_STARTED = "1";
8+
const { build } = await import("velite");
9+
await build({ watch: isDev, clean: !isDev });
10+
}
11+
12+
const nextConfig = withPlausibleProxy()({
513
async headers() {
614
return [
715
{
@@ -33,7 +41,8 @@ const nextConfig: NextConfig = withPlausibleProxy()({
3341
},
3442
{
3543
source: "/slack",
36-
destination: "https://join.slack.com/t/spiraldb/shared_invite/zt-382vtcz8y-Fe5YEL2_zShwSCgNRnwktQ",
44+
destination:
45+
"https://join.slack.com/t/spiraldb/shared_invite/zt-382vtcz8y-Fe5YEL2_zShwSCgNRnwktQ",
3746
permanent: false
3847
}
3948
];

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"@mdx-js/react": "^3.1.1",
13+
"@next/mdx": "^15.5.3",
14+
"@tailwindcss/typography": "^0.5.18",
1215
"@vercel/analytics": "^1.5.0",
13-
"gray-matter": "^4.0.3",
1416
"next": "15.2.4",
1517
"next-plausible": "^3.12.4",
1618
"ogl": "^1.0.11",
1719
"prettier": "^3.5.3",
1820
"react": "^19.0.0",
1921
"react-dom": "^19.0.0",
2022
"react-markdown": "^10.1.0",
21-
"use-scramble": "^2.2.15"
23+
"use-scramble": "^2.2.15",
24+
"velite": "^0.3.0"
2225
},
2326
"devDependencies": {
2427
"@eslint/eslintrc": "^3",

0 commit comments

Comments
 (0)