Basis-Website

Die kleinste brauchbare sitelo-Website: eine Seite, ein Stylesheet und Hoster-Konfigurationen, die dist/ veröffentlichen. Kopiere die Konfigurationen in jedes sitelo-Projekt — sie setzen nur npm run builddist/ voraus.

Eine lauffähige Kopie liegt im sitelo-Repository unter examples/basic/.

Was du bekommst

Projektstruktur

my-site/
  sitelo.config.js
  netlify.toml           # Netlify
  vercel.json            # Vercel
  wrangler.toml          # Cloudflare Pages
  amplify.yml            # AWS Amplify
  package.json
  src/
    index.ht.js
    css/
      styles.css
import { html, head, title, link, body, h1 } from 'javascript-to-html'

export default () =>
  html({ lang: 'de' },
    head(
      title('sitelo — Basis-Beispiel'),
      link({ rel: 'stylesheet', href: '/styles.css' }),
    ),
    body(h1('Hallo von sitelo')),
  )

Build

npm install
npm run build

Deployment

Setze im sitelo-Monorepo das Root- bzw. Basisverzeichnis der Plattform auf examples/basic.

Netlify

[build]
  command = "npm run build"
  publish = "dist"

Vercel

{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "framework": null,
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "installCommand": "npm install"
}

Auf Vercel deployen · Auf Netlify deployen (setze das Basisverzeichnis auf examples/basic, wenn du gefragt wirst).

Cloudflare Pages

Dashboard: Build-Befehl npm run build, Ausgabeverzeichnis dist. Oder npx wrangler pages deploy dist nach einem lokalen Build.

name = "sitelo-basic"
compatibility_date = "2025-01-01"
pages_build_output_dir = "dist"

AWS Amplify

Verbinde das Repository in Amplify Hosting. Für schlichtes S3 + CloudFront baust du lokal und synchronisierst dist/ mit dem Bucket.

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm install
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: dist
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Du arbeitest mit Cursor, Copilot oder einem anderen Agenten? Kopiere die AGENTS.md aus diesem Beispiel (oder siehe Mit KI entwickeln), damit die Werkzeuge keine React-/Next-Muster erfinden.

Erste Schritte · Mit KI entwickeln · Todo-App · Server-Islands-Beispiel