Instruction file imported from getastrothemes/lumio-lite-astro (
.cursor/rules/theme-architecture.mdc). Copyright stays with the author.
Theme Architecture Rules
Read AGENTS.md before generating or editing code in this theme.
Core rules:
- This is an Astro and Tailwind CSS theme.
- Reuse existing components, widgets, cards, schemas, styles, and content patterns.
- Section components live in
src/layouts/components/sections/. - Section content lives in
src/content/sections/{language}/. - For every new section, create one
.astrocomponent and one.mdor.mdxcontent file. - For page-specific sections, use
Sectionin the component name and-sectionin the content filename. - Put editable copy, links, images, buttons, and options in content files.
- Update
src/sections.schema.tswhen adding content fields. - Use page frontmatter named blocks for page-specific section overrides.
- Use
Button.astro,Icons.astro, andOptimizedImage.astroinstead of rebuilding shared primitives. - Use nearest Tailwind theme values from
src/styles/theme.css. - Avoid Tailwind arbitrary values.
- Check
base.css,components.css, andsafe.cssbefore adding new CSS or duplicated utility classes. - Do not add heading classes already covered by
base.css, including default font weight, tracking, leading, or wrapping classes. - Keep imports clean. Do not add unused wrappers, unused JS, or duplicate abstractions.
- Prefer static rendering. Add client JavaScript only for required interaction.
- Keep copy generic for a shippable theme; avoid hardcoded brand names in reusable section content.
Before finishing:
- Run
npm run astro-checkafter code or schema changes. - Run
npm run buildfor broad changes that affect routing, content collections, or assets.