Yapay zekâ ile geliştirme
Bu sayfada
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.
- https://sitelo.dev/llms.txt — derli toplu API ve kurallar
- https://sitelo.dev/docs — tüm rehberler
- GitHub README — zihinsel model ve özelliklere genel bakış
- https://ht.js.org —
javascript-to-htmlbelgeleri (JS içinde HTML yazmak için önerilir)
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ı
- Bir şablondan başlayın — ajandan bir framework uydurmak yerine examples/basic ya da examples/wordpress üzerinden iskelet kurmasını isteyin.
- Biçimlendirme için javascript-to-html (
ht.js) tercih edin — şablon motoru ya da React olmadan HTML dizeleri döndüren etiket fonksiyonları. JSX bileşen ağaçları uydurmasınlar diye ajanları ht.js.org adresine yönlendirin. - Sayfalar HTML döndüren fonksiyonlardır —
export default () => `<html>…</html>`ya dajavascript-to-htmlile birleştirin. Dizelere derlendiği sürece JSX de olur; React çalışma zamanı gerekmez. - Özel bir Vite yapılandırmasına ihtiyacınız olduğunu bilmiyorsanız doğrudan
vitedeğil, sitelo’nun CLI’ını kullanın —sitelo/sitelo build. - API’leri llms.txt ile doğrulayın — özellikle
generateStaticParams,fetchWithCacheve sunucu adaları. - Varsayılan olarak sıfır JS — yalnızca sayfanın istemci koduna ihtiyacı olduğunda bir
<script>bağlayın; başvurulmayan modüller sunucuda kalır. - İnceleyin ve çalıştırın — ajan sayfaları düzenledikten sonra her zaman
sitelo build(ya da geliştirme sunucusunu) çalıştırın; üretilen biçimlendirmeyi taslak sayın.
Başlarken · Temel örnek · llms.txt