
Public
Like
1
repro-fyi
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v48View latest version
A minimal reproduction guide hosted on Val Town.
π Live site: repro.fyi
This val is a simple HTTP server that:
- Reads
index.mdβ The content file with all the guide text - Renders to HTML β Uses
markedto convert markdown to HTML - Wraps in a template β
template.tsxprovides the HTML shell, styling, and theme toggle - Serves to the browser β
main.tsties it all together
main.ts - HTTP handler, reads markdown, renders template
template.tsx - Preact component that outputs HTML (JSX rendered to string)
index.md - Markdown content
README.md - This file
- Val Town β Serverless hosting
- Deno β Runtime
- Preact β Lightweight component rendering (JSX β HTML string)
- Marked β Markdown to HTML
- Water.css β Classless CSS framework
- std/utils β Val Town stdlib for file I/O
To edit the content, modify index.md.
To edit the styling or HTML structure, modify template.tsx.
To change how the server works, modify main.ts.
The site automatically deploys when you save changes.
The template includes a light/dark mode toggle button (π/βοΈ) that:
- Uses Water.css's light and dark variants
- Saves preference to localStorage
- Respects system preference on first load
- Responds to system preference changes
Public domain. Copy it, remix it, make it better.
Built with β€οΈ on Val Town