• Product Introduction
  • Billing
    • Billing Overview
    • Package
      • Plan Comparison
      • Free Plan
      • Pro Plan
      • Commercial Plan
    • Purchase and Renewal Guide
    • Plan Consumption and Usage
    • Billing Rules
      • Resource Billing Description
      • MU Billing Overview
    • Overdue Payments and Refunds
      • Overdue Payments and Plan Expiration
      • Refund
    • Billing FAQs
  • Quick Start
    • Agent Development
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Agent
    • Frontends
      • Vite
      • React
      • Vue
      • Hugo
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Space Guide
    • Space Management
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Building Output Configuration
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • HTTPS Configuration
      • Overview
      • Apply for Free Certificate
      • Using Managed SSL Certificate
    • Configure DNS CNAME Record
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Makers for Platforms
    • Platform and Multi-Tenancy
    • Vibe Coding Solution
    • Platform Request Middleware
    • Template Example
      • Vibe Coding General Template
      • Vibe Coding Platform Template
  • Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node.js
      • Python
      • Go
  • Agents
    • Overview
    • Quick Start
    • Conversation Management
    • Observability
    • Sandbox Tool
      • Overview
      • Using the Agent Framework
      • Sandbox Atomic API
      • Network Search Tool
    • Agent Authentication
  • Models
    • Overview
    • Models and Vendors
      • Overview
      • Using the Zhuque Model
      • Using the Jev Model
      • Using Vendor Keys
        • OpenAI
        • Anthropic
        • Google AI Studio
        • DeepSeek
        • MiniMax
        • Hunyuan
        • Zhipu
        • MoonShot AI
    • FAQs
  • Storage
    • Overview
    • KV
    • Blob
  • Middleware
  • AI-Native Development
    • Skills
    • MCP
    • Plugin
  • Copilot
    • Overview
    • Quick Start
  • API Token
  • EdgeOne CLI
  • Makers API
    • History
    • API Category
    • Making API Requests
      • Request Structure
      • Common Params
      • Signature v3
      • Signature
      • Responses
    • Project APIs
      • CreateProject
      • DeleteProject
      • DeleteProjectEnvs
      • DescribeEnvironments
      • DescribeProjectEnvs
      • DescribeProjects
      • ModifyProject
      • ModifyProjectEnvs
    • Deployment APIs
      • CreateDeployment
      • DescribeCosTempToken
      • DescribeDeploymentLog
      • DescribeDeployments
    • Domain Name APIs
      • CreateZoneCustomDomain
      • DeleteProjectCustomDomains
      • DescribeZoneCustomDomains
      • ModifyZoneCustomDomainEnv
      • VerifyOwnership
      • CheckCnameStatus
      • ApplyFreeCertificate
      • CheckFreeCertificateVerification
      • ModifyHostsCertificate
    • Data Types
    • Error Codes
  • Makers SDK
    • Overview
    • Examples
      • Creating a Deployment
      • Deploying via the CLI
      • Project Management
    • Projects
      • Project Operations
      • Environment Variable
    • Deployment
    • Domain
  • Message Notification
  • Access Permission
  • Integration Guide
    • AI
      • Makers Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
    • IM
      • Overview
      • WeCom
      • Feishu
      • DingTalk
      • Telegram
      • slack
      • Discord
  • Best Practices
    • Adding an AI Chat Assistant to a Website
    • AI Dialogue Deployment: Deploy Project with One Sentence Using Skill
    • Building Agent Applications Quickly with Makers Agents
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
    • Quick Launch via Login-Free Deployment in WorkBuddy
  • Migration Guides
    • Migrating from Vercel to EdgeOne Makers
    • Migrating from Cloudflare Pages to EdgeOne Makers
    • Migrating from Netlify to EdgeOne Makers
  • Troubleshooting
  • FAQs
  • Contact Us
  • Release Notes

Astro

Astro is a modern open-source Web framework with broad influence in the Web development community, and it is a popular choice for building content-driven websites and applications.
Attention:
Supports Astro 5, 6, and 7, with Astro 7 recommended. Using Astro 7 requires @edgeone/astro 1.2.0 or later, and older versions of the adapter will report dependency conflicts during installation.
When Astro projects are deployed and run, the Makers platform runtime environment requires Node.js 22+. It is recommended to use an earlier Node.js version.

Core Features

Astro provides the following core features:
Islands Architecture: Astro adopts the Islands Architecture design, treating interactive components on the page as independent "islands" that are hydrated on the client side only when needed, while the rest remain static.
Server-Side Rendering (SSR): Astro's server-side rendering can render dynamic data without requiring client-side JavaScript, while not slowing down pages that do not need this feature.
Static Site Generation (SSG): Supports pre-rendering pages and generates static HTML at build time.
Multi-Framework Support: When using Astro, you can still use other frameworks (Vue, React, Svelte). It supports the mixed use of multiple framework components in the project.
Content Collections: Organize Markdown and MDX content with type-safe frontmatter.
API Routes: Server-side API endpoints for dynamic data processing.

Getting Started

You can quickly deploy an Astro project on EdgeOne Makers in the following ways:
Import an Astro project from a Git repository.
Select an Astro template from the Makers template library to deploy.
To learn how Astro performs when deployed on Makers, click the Astro sample template from Makers below:

To view more Astro templates from Makers, visit the Astro Template Library.

Makers' Support for Astro Features

The following table lists the key features that Makers currently supports for Astro:
Astro Feature
Support Status
Islands architecture rendering
✓
Server-side rendering (SSR)
✓
Static site generation (SSG)
✓
Multi-framework support
✓
Content collections (MD, MDX)
✓
API routing
✓
Actions routing
✓
Middleware
Supports Astro built-in middleware
Image component
Not supported.
Platform ISR
Not supported.
Unsupported Astro features are currently being planned on the Makers platform. It is recommended to follow the version updates of the @edgeone/astro adapter to get the latest features and improvements in a timely manner.

Deploying an Astro Project on Makers

1. Installing the Astro Adapter for Makers

The Astro adapter for Makers is named @edgeone/astro. It automatically adapts the build output of Astro applications for the Makers platform. Similar to @astrojs/vercel, it works with the Makers scaffolding tool to package and deploy local Astro projects to the Makers platform. The adapter source code is open source. You are welcome to visit the astro-adapter repository to view the source code, submit issues, or contribute.
The following is the installation command for the adapter:
npm install @edgeone/astro

2. Configuring astro.config.mjs

According to the Astro configuration file API, users need to configure the Makers platform adapter in the astro.config.mjs file of the Astro project. The following is a configuration example:
import { defineConfig } from "astro/config";
import edgeoneAdapter from "@edgeone/astro";

export default defineConfig({
adapter: edgeoneAdapter(),
});

3. Deploying the Project

Deploying via Git Connection
After seamless integration of the adapter, you can submit the project to platforms such as GitHub and GitLab and use our Import Git Repo.
CLI Deployment
You can also install the Makers scaffolding tool. For detailed installation and usage instructions, see EdgeOne CLI. After configuration, use the `edgeone makers deploy` command to deploy the project. During deployment, the CLI automatically builds the project first, and then uploads and publishes the build artifacts.
Attention:
EdgeOne CLI version requirement ≥ 1.2.4. Please first check the version before deployment to avoid deployment failure.

Configuring the Makers Adapter for Astro

The adapter supports the following configuration options:
outDir (optional): Specifies the build output directory, with a default value of .edgeone. Example: outDir: ".edgeone".
includeFiles (optional): A mandatory inclusion file list used to underwrite specific files is packaged into server-side rendering code. Supports glob pattern matching. Example: includeFiles: ["src/locales/**", "public/config.json"].
excludeFiles (optional): A list of files to exclude from being packaged into server-side rendering code. It is mainly used to exclude specific files in node_modules. Supports glob pattern matching. Example: excludeFiles: ["node_modules/.cache/**"].
The following is a configuration example:
import { defineConfig } from "astro/config";
import edgeoneAdapter from "@edgeone/astro";

export default defineConfig({
output: "server",
adapter: edgeoneAdapter({
outDir: ".edgeone",
includeFiles: ["src/locales/**"],
excludeFiles: ["node_modules/.cache/**"],
}),
});

Static Site Generation (SSG)

You can use Astro to generate a fully static site. To configure static export mode, modify astro.config.mjs as shown in the following example:

export default defineConfig({
output: 'static' // Enable static export
});
Note: In Astro's SSG (Static Site Generation) mode, all pages are pre-rendered as static HTML at build time. There is no server runtime, so server-side features cannot be used, including API routes (src/pages/api/*), middleware (src/middleware.ts), and any other features that require server-side execution.

Server-Side Rendering (SSR)

The Makers adapter also supports Astro's server-side rendering feature. To enable SSR mode, set the following configuration in astro.config.mjs:

export default defineConfig({
output: 'server' // Enable server-side rendering
});
In SSR mode, allow you to dynamically generate HTML content on the server side, provides better SEO support, faster page load speed, and real-time rendering capability for dynamic content.
In addition to pure SSR mode, Makers also supports Astro's hybrid mode. In hybrid mode, you can flexibly control the rendering method of each page:
Static page: Set export const prerender = true in the page, and the page will be pre-rendered as a static HTML file at build time.
Dynamic page: Pages where prerender is not set to true will be dynamically rendered using SSR.

Incremental Static Regeneration (ISR)

Incremental Static Regeneration is an extension of SSG that combines the advantages of SSG and SSR, eliminating the need to rebuild the entire site when data is updated. Astro does not provide page-level ISR exports, so you can enable it in the adapter's isr option in astro.config.mjs (effective only for SSR routes that are not pre-rendered). Use expiration (in seconds) to set the regeneration interval for routes: when a visitor requests a route after the cache expires, the old version is returned first while the page is regenerated in the background.
import { defineConfig } from "astro/config";
import edgeoneAdapter from "@edgeone/astro";

export default defineConfig({
output: "server",
adapter: edgeoneAdapter({
isr: {
routes: {
// Revalidate every 60 seconds
"/blog/**": { expiration: 60 },
},
},
}),
});

ai-agent