Skip to content

feat(types,emitter): rest parameters + per-route collections (findings #15, #16) - #143

Merged
ABB65 merged 1 commit into
mainfrom
feat/rest-params-collections
Aug 31, 2026
Merged

feat(types,emitter): rest parameters + per-route collections (findings #15, #16)#143
ABB65 merged 1 commit into
mainfrom
feat/rest-params-collections

Conversation

@ABB65

@ABB65 ABB65 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Ne

İki madde birlikte — ikisi de route/emitter katmanında ve birlikte sayfaları gerçek içerik olarak taşımanın önünü açıyor.

#15 — iç içe taksonomi/sayfa yolları. Desende sondaki * artık rest parametresi: /category/:term*category/[...term].astro. /category/about-cc/events/ hiyerarşisini koruyor; tek segmentli parametre onu /category/events/'e düşürüp bütün iç içe bağlantıları kırıyordu. Aynı mekanizma iç içe sayfa yollarında da çalışıyor (/:slug*[...slug].astro), yani kapsam sınırını (yalnız üst düzey sayfalar) kaldırabilirsin. Rest parametresi son segment değilse uyarı basılıyor (Astro rest parametrelerini açgözlü eşliyor).

#16 — route başına koleksiyon. RouteModel.collection + EmitContent.collections: her per-entry route kendi veri dosyasını yazıyor (src/data/pages.json), artık posts.json çakışması yok. Boş koleksiyon adıyla uyarılıyor.

Bir tasarım düzeltmesi daha: kural artık "single route'lar ve koleksiyon adı veren her route" — sayfalar ve özel içerik türleri de per-entry route'tur, sadece adı single değildir. Fixture'da kind: 'page' + collection: 'pages' verdiğimde testin yakaladığı açık buydu; sözleşme doc'una da yazıldı.

Test

lint 0/0 · tsc · 8/8 paket build+test; 42 emitter + 9 runtime testi. Yeni 4 test: rest parametresiyle iç içe adres, konum uyarısı, iki single route'un ayrı koleksiyonları (çakışma uyarısı yok), adıyla boş koleksiyon uyarısı.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NjgQYCFqwZjJt97yioyjnS

…ulgu #15, #16)

#15: desende sondaki * rest parametresi olur (/category/:term* →
[...term].astro); iç içe taksonomi ve sayfa adresleri son segmente düşmüyor.
Rest parametresi son segment değilse uyarı (Astro açgözlü eşler).

#16: RouteModel.collection + EmitContent.collections — her per-entry route
kendi veri dosyasını yazar; ikinci içerik türü artık posts.json ile
çakışmıyor, boş koleksiyon adıyla uyarılır. Kural: single routelar VE
koleksiyon adı veren her route koleksiyon-güdümlüdür (sayfalar/CPT de
per-entry routetur).
@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit 4079160
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/6a957c33ca12fe0008aef2c7
😎 Deploy Preview https://deploy-preview-143--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ABB65
ABB65 merged commit 058bde8 into main Aug 31, 2026
6 checks passed
@ABB65
ABB65 deleted the feat/rest-params-collections branch August 31, 2026 13:12
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant