A syntax highlighter that generates images from code snippets. This is a port of the Satori Syntax Highlighter project to Val Town, restructured using Hono.
├── backend/
│ ├── index.ts # Main entry point with Hono setup
│ └── routes/
│ └── highlighter-route.ts # Highlighter API route
├── frontend/
│ ├── components/
│ │ └── Playground.tsx # React component for the playground
│ ├── index.html # HTML template
│ └── index.tsx # Client-side entry point
└── shared/
├── types.ts # Shared TypeScript types
└── utils.ts # Shared utilities
Visit the frontend page to customize and generate syntax-highlighted images. The API endpoint is available at /api/highlighter with the following parameters:
code: The code to highlightbackground: The background color (default: gold)lang: The language (js, css, typescript, xml)fontSize: The font size (default: 16)The MIT License (MIT).