Skip to content

superhighfives/code.charliegleason.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

246 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code.charliegleason.com

This is a little code blog, built with React Router 7 and deployed on Cloudflare Workers. I wanted a fast, flexible, themable setup where I could write in MDX and include live, editable code examples in the posts.

What it does

  • 🚀 React Router 7 with server-side rendering
  • Cloudflare Workers - everything runs on the edge
  • 🎨 AI-generated visuals via Replicate with user-controlled variations per post
  • 🍪 Cookie-based routing for clean URLs between index and posts
  • 💻 Live code blocks powered by Sandpack
  • 🤓 WASM-powered syntax highlighting with Shiki and OG image generation with Satori
  • 📝 MDX content with full React component support
  • 🖼️ Dynamic social images generated on-the-fly
  • 🌓 Dark and light themes that respect system preferences
  • 📡 RSS feed for your favorite feed reader

How it works

Built with React Router 7 and deployed on Cloudflare Workers.

Content is written in MDX. Code blocks are syntax-highlighted on the server using Shiki with Catppuccin themes. Interactive code blocks use Sandpack to provide a full in-browser editing experience with live preview. Open Graph images are generated dynamically using Satori, which renders React components to SVG.

Running it locally

Prerequisites:

  • Node.js 18 or later
  • npm

Install dependencies:

npm install

Start the development server:

npm run dev

Your application will be available at http://localhost:5173.

Run tests:

npm test

Deployment

Build for production:

npm run build

Deploy to Cloudflare Workers:

npm run deploy

Generate types for Cloudflare bindings:

npm run typegen

About

A little code blog built on React Router 7 and Cloudflare Workers.

Topics

Resources

Stars

Watchers

Forks

Contributors