About

sitelo didn’t start as a framework. It started as an itch to write markup in a way that felt natural in JavaScript — and kept growing until the whole path from page file to shipped site was covered.

javascript-to-html

First came javascript-to-html (also known as ht.js): a simple, intuitive way to generate HTML in JavaScript, without complex templating engines or frameworks.

Given how ubiquitous full-featured frameworks like React had become, finding a simple templating solution that didn’t include the kitchen sink was surprisingly hard. By focusing only on transforming JavaScript to HTML — basically functions that return strings — ht.js stays lightweight, easy to use, flexible, and extensible.

That small surface means it fits many places: directly in the frontend (SPA-style), in a build to create static sites (SSG), or even for server-side rendering (SSR).

Teaching Vite to emit HTML

That solved authoring. The next problem was the build: Vite treats .js / .ts as scripts, not as pages. I needed a convention where certain modules were meant to become HTML.

The idea was straightforward: files named *.ht.js, *.html.js, *.ht.ts, and friends should be processed into HTML instead of bundled as client JavaScript. That convention became vite-plugin-html-pages — file-based routing, data loading, assets, and static generation on top of Vite.

sitelo

sitelo wraps Vite and that plugin into one install and one CLI. You get a holistic, top-notch developer experience: sitelo for a live server, sitelo build for production, sensible defaults, and the plugin’s page model without assembling the toolchain yourself.

Same idea all the way down: pages are modules that return HTML. sitelo is the layer that makes that idea feel finished.

How it compares

Plenty of good tools already ship static sites. sitelo’s niche is narrow on purpose: JavaScript (or TypeScript) functions that return HTML, with Vite’s dev experience, and as little framework as possible.

ToolModelReach for it when
siteloJS/TS functions → HTML on ViteYou want HTML out of JavaScript with a real Vite workflow — no component framework required
AstroComponents + islands, own compilerContent sites that want component islands and a bigger ecosystem
Next.jsFull React app (SSR / SSG / ISR)You’re building an application in the React ecosystem
HugoGo templates, very fast buildsHuge content sites and you’re happy in Go’s toolchain
EleventyTemplate languages → HTMLYou want flexible templates (Nunjucks, Liquid, …) without a SPA framework

If you want components, hydration, and a framework — use a framework. If you want HTML files out of JavaScript functions with the Vite experience, sitelo is the smallest tool that does the whole job.

Read the docs · GitHub