Getting started
sitelo is a zero-config static site generator powered by Vite. Install one package, write functions that return HTML, and run sitelo build.
Install
npm install -D siteloRequires Node 18+. Vite is bundled — you do not install it separately.
Your first page
Create src/index.ht.js (or .ht.jsx). ht.js is recommended:
export default () => `
<html lang="en">
<head><title>My website</title></head>
<body><h1>Hello world</h1></body>
</html>
`import { html, head, title, body, h1 } from 'javascript-to-html'
export default () =>
html({ lang: 'en' },
head(title('My website')),
body(h1('Hello world'))
)export default function Home() {
return (
<html lang="en">
<head><title>My website</title></head>
<body><h1>Hello world</h1></body>
</html>
)
}Run
sitelo # dev server
sitelo build # write dist/
sitelo preview # preview the buildThat emits dist/index.html (with <!DOCTYPE html> added for you) plus a default 404.html.
Next
- Writing pages — template strings, JSX, structured modules
- Routing — file-based routes and
generateStaticParams - Data loading —
data()andfetchWithCache - Assets & styling — frontend JS/CSS compiled by Vite (
src/js,src/css) - Configuration —
sitelo.config.jsand Vite options - Build with AI —
llms.txt, project rules, and agent tips