Skip to main content
hobun

What's inside

Nothing here by accident

Every feature on this site is a lesson from learning Hono and Bun. Most exist because the default toolchain got in the way of something first.

The feature list

Each one is small. Together they are the whole project.

Pure static site generation

toSSG walks the registered routes at build time and writes one real HTML file per route. /404 becomes 404.html.

Zero client-side JavaScript

No bundler, no hydration, no inline bootstrap script. The strict CSP isn't a compromise; there is nothing to exempt.

CSS scoped per page

hono/css collects styles at render time and emits them inline, so each page ships only what it uses. The 404 page has none of the home page's styles; that's checkable indist/404.html.

Live reload without Vite

bun --hot reloads the server; a ~15-line script polls a hash endpoint and reloads the browser. Both are dev-only.

404s that behave

404.html catches every unmatched path on Pages, and app.notFound returns the same styled page in dev. Both are marked noindex.

robots.txt and sitemap.xml as routes

Served in dev exactly like production, pre-rendered at build, and generated from oneROUTES array that can't go stale.

Security headers, twice

public/_headers covers static assets; Hono's secureHeaders covers app responses. The two are kept byte-identical.

Tests without a framework

17 tests using bun:test and the app's own request(); no supertest, no test doubles, no extra dependencies.