Yapay zekâ ile geliştirme

Yapay zekâ destekli düzenleyiciler ve kodlama ajanları sitelo konusunda sık sık yanlış tahmin eder — geçerli olmayan React, Next ya da Astro kalıplarına uzanırlar. Bu rehber, onları güncel sitelo belgelerine nasıl yönlendireceğinizi ve üretilen kodu modele uygun tutmayı gösterir.

llms.txt

sitelo, frameworkün makine tarafından okunabilir bir özetini sitelo.dev/llms.txt adresinde yayımlar. Birçok ajan bir URL getirebilir; sitelo kodu yazmadan önce sizinkinden bu dosyayı (ve insanlar için yazılmış belgeleri) okumasını isteyin.

Bir belge MCP sunucusunun aksine llms.txt kurulum gerektirmez — URL’i sohbete yapıştırın, proje kurallarına ekleyin ya da ajanın getirmesine izin verin.

Proje kuralları

Aracınız kalıcı yönergeleri destekliyorsa (AGENTS.md, Cursor kuralları, Copilot yönergeleri, …), her oturumun doğru zihinsel modelle başlaması için kısa bir sitelo kuralı ekleyin. Temel örnek, kopyalayabileceğiniz bir AGENTS.md içerir:

# 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

Projenizde .cursor/rules/sitelo.mdc oluşturun (ya da aynı metni Cursor’ın proje kuralları arayüzüne yapıştırın):

---
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.

Yapay zekâ destekli sitelo çalışması için ipuçları

Başlarken · Temel örnek · llms.txt