astro-framework

Build Astro websites with islands architecture and hybrid rendering.

3|1|Updated Mar 5, 2024
One-click install
npx skills add https://github.com/chuan-khuna/digital-garden-2024 --skill astro-framework-chuan-khuna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astro-framework
Source: https://github.com/chuan-khuna/digital-garden-2024/tree/main/.agents/skills/astro-framework
Command: npx skills add https://github.com/chuan-khuna/digital-garden-2024 --skill astro-framework-chuan-khuna

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps frontend teams architect fast, content-driven websites by orchestrating Astro's islands architecture, hydration directives, content loaders, and server-side rendering strategies.

Core Features & Use Cases

  • Islands-based hydration guidance: decide when to hydrate with client:load/idle/visible/media and when to defer with server:defer for server islands.
  • Content Layer API and loaders: leverage glob/file loaders for static data and live loaders for dynamic data across Astro projects.
  • Integrations and deployments: configure astro.config.mjs adapters, environment variables, i18n routing, and multi-framework UI integrations (React/Vue/Svelte/Solid).

Quick Start

Install and configure an Astro project with islands architecture and a basic content page to get started.

Frequently Asked Questions about astro-framework

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide when to use Astro islands hydration directives like client:load versus client:visible?

Astro islands hydration directives control when client-side JavaScript loads. Use client:load for immediate interactivity, client:idle for lower priority, and client:visible to defer hydration until the component enters the viewport. Use server:defer for server islands to keep heavy logic entirely backend-side.

How do I configure hybrid rendering and SSR adapters in astro.config.mjs?

Configure hybrid rendering and SSR adapters in astro.config.mjs by importing the desired adapter and adding it to the export default defineConfig object. This enables server-side rendering strategies, allowing you to mix static site generation with dynamic server-rendered pages.

What is the Astro Content Layer API and how do I use data loaders?

The Astro Content Layer API manages structured data for content-driven websites. Use glob or file loaders to fetch static local data, and implement live loaders to pull dynamic data from external sources across Astro projects, keeping your content schema robust and isolated.

Can I use React, Vue, Svelte, and Solid components together in a single Astro project?

Yes, Astro supports multi-framework UI integrations. You can import and render React, Vue, Svelte, and Solid components together in a single Astro project. Each framework's renderer is configured via integrations, and components are hydrated selectively using islands architecture.

How do I set up i18n routing and environment variables in an Astro project?

Set up i18n routing by defining locale configurations in astro.config.mjs, and manage environment variables using astro env. This ensures safe, isolated execution of environment-specific data and provides robust validation for internationalized content paths.

What are Astro server islands and when should I defer component rendering?

Astro server islands allow you to isolate and defer rendering of specific components using server:defer. This technique prevents slow-running dynamic components from blocking the initial HTML payload, keeping fast, content-driven static pages lightweight while rendering heavier elements asynchronously.