feat(types,emitter): rest parameters + per-route collections (findings #15, #16) - #143
Merged
Conversation
…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).
✅ Deploy Preview for contentrain-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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ıkposts.jsonçakışması yok. Boş koleksiyon adıyla uyarılıyor.Bir tasarım düzeltmesi daha: kural artık "
singleroute'lar ve koleksiyon adı veren her route" — sayfalar ve özel içerik türleri de per-entry route'tur, sadece adısingledeğildir. Fixture'dakind: '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