VirtusLab-Open-Source/astro-strapi-blocks

Astro blocks for Strapi Rich Text Block field

Stars 19 Language TypeScript Last updated 2026-07-26 Source on GitHub @VirtusLab-Open-Source

Actual rules from this repo

Path in source repo: .cursor/rules/astro-strapi-blocks.mdc · format: mdc

---
description: Astro + Strapi Blocks — StrapiBlocks, data, theme (extend/overwrite), custom blocks
globs: "**/*.{astro,ts}"
alwaysApply: false
---

# Astro Strapi Blocks

- **Import:** `StrapiBlocks` from `@sensinum/astro-strapi-blocks`. **`data`:** raw Strapi 5 Blocks array (`StrapiBlockField`); use the same field the API already returns (e.g. `page.content`, `item.description`).

- **Theme:** `theme={{ extend: { … } }}` appends/merges with defaults; `overwrite` replaces class arrays at each path. Library order: `overwrite` first, then `extend`. For nested list markers, set `list.indent.ordered` / `unordered` as per-level class arrays; see package README.

- **Custom components:** `blocks={{ heading: MyHeading, … }}`. Each Astro override must match the block’s props (`data`, `theme`, and type-specific props in README). Use `renderPropertyClasses` / `getPropertyClass` from the package when reusing theme paths.

- **New CMS block types** need Strapi schema support; this component only dispatches built-in `type` values—combine with dynamic zones and parent switches for non-standard blocks.

- Deeper context: repository `.ai/astro-strapi-blocks/SKILL.md` and root `README.md`.

View raw on GitHub

Why this is listed

This repository appears on Cursor Rules Live because it matches the tracker's GitHub Search criteria (cursor-rules) and was active in the recent indexing window. The tracker refreshes every 15 minutes, so the metadata above reflects the state at the most recent index pass. If the data here looks stale, the source repository may have been archived or moved out of the tracked topic; the next cron tick will reconcile.

Similar in this tracker

Explore by category