Tworzenie z AI

Edytory z AI i agenci programistyczni często zgadują o sitelo źle — sięgają po wzorce Reacta, Nexta albo Astro, które tu nie obowiązują. Ten przewodnik pokazuje, jak skierować je do aktualnej dokumentacji sitelo i utrzymać generowany kod w zgodzie z modelem.

llms.txt

sitelo publikuje czytelne dla maszyn streszczenie frameworka pod adresem sitelo.dev/llms.txt. Wielu agentów potrafi pobrać URL; poproś swojego, żeby przeczytał ten plik (i dokumentację dla ludzi), zanim zacznie pisać kod sitelo.

W odróżnieniu od serwera MCP z dokumentacją llms.txt nie wymaga instalacji — wklej URL do czatu, dodaj go do reguł projektu albo pozwól agentowi go pobrać.

Reguły projektu

Jeśli Twoje narzędzie obsługuje trwałe instrukcje (AGENTS.md, reguły Cursora, instrukcje Copilota, …), dodaj krótką regułę o sitelo, żeby każda sesja zaczynała się z właściwym modelem myślowym. Podstawowy przykład zawiera AGENTS.md, który możesz skopiować:

# sitelo

This project uses [sitelo](https://sitelo.dev) — a Vite-powered static site generator.

## Rules

- Pages are modules under `src/` with extensions like `.ht.js` / `.ht.ts` / `.ht.jsx` that **export a default function (or string) returning HTML**.
- Do **not** introduce React, Next.js, Astro, or a component/hydration framework unless the user explicitly asks.
- Routing is file-based: `about.ht.js` → `/about`, `[slug].ht.js` → dynamic (use `generateStaticParams` for `sitelo build`).
- Load data with `export async function data(ctx)`. Use `fetchWithCache` from `sitelo` for cached HTTP. Read local JSON with `readJson` / `readJsonCollection` from `sitelo/data`.
- Only JS/CSS referenced from HTML is bundled into `dist/`. Keep server-only code unreferenced so it never ships.
- Config lives in `sitelo.config.js`. Put Vite options under `vite`.
- Commands: `sitelo` (dev), `sitelo build`, `sitelo preview`.
- For current APIs, read https://sitelo.dev/llms.txt and https://sitelo.dev/docs — do not invent APIs from other frameworks.
- Prefer [javascript-to-html](https://ht.js.org) (`ht.js`) for markup: tag functions that return HTML strings. Docs: https://ht.js.org

Cursor

Utwórz .cursor/rules/sitelo.mdc w swoim projekcie (albo wklej ten sam tekst w interfejs reguł projektu w Cursorze):

---
description: sitelo static site conventions
alwaysApply: true
---

# sitelo

Pages are `.ht.js` (etc.) modules that return HTML strings — not React/Next/Astro components.
Prefer javascript-to-html (https://ht.js.org) for markup. Use file-based routing, `data()`, and `sitelo build`.
Prefer https://sitelo.dev/llms.txt for sitelo APIs.

Wskazówki do pracy nad sitelo z AI

Pierwsze kroki · Podstawowy przykład · llms.txt