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 sitelo

Requires Node 20.19+ (or 22.12+). Vite is bundled — you do not install it separately.

Your first page

Create src/index.ht.js (or .ht.jsx). ht.js is recommended:

import { html, head, title, body, h1 } from 'javascript-to-html'

export default () =>
  html({ lang: 'en' },
    head(title('My website')),
    body(h1('Hello world'))
  )

Run

sitelo          # dev server
sitelo build    # write dist/
sitelo preview  # preview the build

That emits dist/index.html (with <!DOCTYPE html> added for you) plus a default 404.html.

Next