- ..
- assets
- content
- data
- layouts
- partials
- samples
- bongo.config.ts684 B
- bun.lock37 KB
- code.ts3.5 KB
- install.sh3.1 KB
- package.json892 B
- readme.md2.7 KB
- tsconfig.json424 B
- utils.ts5.1 KB
- worker.ts2.8 KB
- wrangler.jsonc807 B
readme.md
www
The site at tidy.lukeed.com, built with bongo and served from Cloudflare Workers static assets.
bun install
bun run dev # http://localhost:3000
bun run build # writes public/
bun run preview # wrangler dev, with the Worker
bun run deploy # build, then wrangler deploy
bun run check # the home page samples are still what tidy prints
Layout
| Path | What it is |
|---|---|
content/ | Pages. index.hbs is the home page; docs/*.md are the docs. |
layouts/ | html.hbs wraps everything; docs/index.hbs is the docs shell. |
partials/ | The header, the wordmark, the search dialog. |
assets/ | Styles, the client script, fonts and images. |
data/ | bench.ts holds the benchmark numbers, release.ts reads the version from Cargo.toml. |
samples/ | The before and after on the home page, plus check.ts, which proves they are tidy's output. |
worker.ts | The analytics proxy and the install script. |
Sidebar groups come from each page's group frontmatter, ordered by order. The group names and their order live in GROUPS in utils.ts.
The Worker
Everything is a static asset except four paths, listed in run_worker_first:
/x/script.jsand/xproxy crowne.io, so that a blocker is less likely to drop them./install.shserves the install script./serves the install script to a command line (curl,wget, …) and the home page to a browser, socurl -fsSL https://tidy.lukeed.com | shworks.
Serving the script counts a download event, with piped (whether it came from / or /install.sh) and platform. The archives themselves come from GitHub releases, so that event is the closest thing to a download count.
Analytics never block the response: a failed event is logged and dropped.
Before deploying
- Put the crowne.io site id in
CROWNE_SITEinwrangler.jsonc. - Set the key as a secret:
bunx wrangler secret put CROWNE_KEY. - Point
tidy.lukeed.comat the Worker, which theroutesentry claims as a custom domain.
Without both values the Worker still serves everything; it just counts nothing.
Benchmark numbers
data/bench.ts is the single source for the home page and the Benchmarks page. It is transcribed from bench/results/format; update it when the benchmarks are re-run.