astro-strapi-starter / rules
VirtusLab-Open-Source/astro-strapi-starter/.cursor/rules/astro-strapi-starter.mdc
Astro x Strapi starter — layout, content collections, block renderer vs StrapiBlocks, types
Cursor rule21 starsChanged 2 months ago
- Reads credentials
What's in it
- Astro Strapi starter
--- description: Astro x Strapi starter — layout, content collections, block renderer vs StrapiBlocks, types globs: "**/src/**" alwaysApply: false --- # Astro Strapi starter - **Stack:** Astro 7, Strapi 5, `@sensinum/astro-strapi-loader`, `@sensinum/astro-strapi-blocks` (read [`.ai/AGENTS.md`](../../.ai/AGENTS.md) and [`.ai/astro-strapi-starter/SKILL.md`](../../.ai/astro-strapi-starter/SKILL.md)). **Onboarding:** copy or fetch upstream raw `SKILL` for loader/blocks (pin to `package.json` versions) per the starter skill — stubs are not a substitute for full upstream docs. - **Content:** `src/content.config.ts` exports `collections` from `generateCollections`. Handle Strapi unavailability in `try/catch` so static builds or local dev can still run. - **Two patterns:** (1) **Dynamic zone** entries with `__component` → `BlockRenderer.astro` and siblings under `src/components/blocks/`. (2) **Rich text Blocks JSON** from Strapi 5 → `<StrapiBlocks />` inside those components when the field is a Blocks editor, not a separate dynamic-zone component. - **Types:** Under `src/types/strapi/`, add or edit focused modules and **re-export** from `index.ts`. Align with Content Builder / Content API; the loader emits Zod from schema introspection — hand types should match the same shapes. - **Do not** commit `.env` or real API tokens. Use `env.example` as the template for variable names.
More agent context in VirtusLab-Open-Source/astro-strapi-starter
5 other files this repository gives its agents.
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

