惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
人人都是产品经理
人人都是产品经理
小众软件
小众软件
博客园 - Franky
WordPress大学
WordPress大学
Jina AI
Jina AI
Google DeepMind News
Google DeepMind News
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
博客园 - 【当耐特】
IT之家
IT之家
G
Google Developers Blog
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
V
Visual Studio Blog
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
GbyAI
GbyAI
雷峰网
雷峰网

The Astro Blog

Astro 6.4 Astro 6.3 Starlight 0.39 Astro 6.2 What's new in Astro - April 2026 What's new in Astro - March 2026 Astro 6.1 CloudCannon Joins Astro as an Official CMS Partner Astro 6.0 What's new in Astro - February 2026 What's new in Astro - January 2026 Astro 5.17 Supporting the future of Astro The Astro Technology Company joins Cloudflare Astro 6 Beta What's new in Astro - December 2025 What's new in Astro - November 2025 Astro 5.16 Stainless Sponsors Astro, Launches Astro-Powered Docs Platform What's new in Astro - October 2025 Astro 5.15 Spirit of Astro: meet the winning designs What's new in Astro - September 2025 Astro 5.14 Cloudflare Donates $150,000 to Support Astro's Open Source Mission Webflow Donates $150,000 to Support Astro's Open Source Mission Mux: Our Official Video Partner Unleashing creativity: How CodeTV built a video streaming platform with Astro and Mux | Astro What's new in Astro - August 2025 Astro 5.13
Astro on Netlify Edge Functions | Astro
Matthew Phillips · 2022-04-19 · via The Astro Blog

Two weeks ago, we announced experimental support for server-side rendering (SSR) with Netlify as our launch partner on Netlify Functions. Today, we’re announcing support for SSR on Netlify’s new Edge Functions platform. Edge Functions went live today and Astro has day 1 support.

With SSR and Astro, you can:

  • Build large, CMS-backed sites that are difficult to scale with SSG (static-site generation).
  • Build apps that need authentication or persistent state, such as E-commerce backends.
  • Use a simplified HTML-like syntax with sprinkles of JavaScript, only when you need it.

With edge rendering you bring SSR closer to your users, getting those first bytes to the browser, faster. Combined with serving static assets at the edge, this gives you optimal network performance. Astro is committed to making performant content sites easy to achieve, and Netlify’s new Edge Functions platform is an ideal place to deploy your Astro SSR applications today.

To get started, install the Netlify adapter:

npm install @astrojs/netlify

And then add the adapter in your astro.config.mjs file:

import { defineConfig } from "astro/config"

import netlify from "@astrojs/netlify/edge-functions"

export default defineConfig({

adapter: netlify(),

})

Migrating from Netlify Functions

Astro is already available on Netlify Functions, a Node.js based serverless runtime. With Edge Functions you can get even better performance, and we’ve tried to make it as easy as possible to switch.

Compatibility

Netlify Edge Functions run on top of Deno, but most Astro applications do not need to change code to deploy to the new environment. The Netlify adapter takes care of compiling and bundling your source so that it can run on Deno.

If you are using dependencies that depend on Node.js’ built-in modules, it’s possible that you cannot move off of Netlify Functions. If so, Netlify Functions is still a great platform for most use-cases and provides a standard Node.js runtime for Node package support.

If you use the <Markdown /> component, it cannot presently run in non-Node environments. A possible alternative in the meantime is using .md pages.

Migration

First, upgrade to the latest @astrojs/netlify like so:

npm install @astrojs/netlify@latest

Then, update your astro.config.mjs to import the edge functions adapter:

import { defineConfig } from 'astro/config';

import netlify from '@astrojs/netlify/functions';

import netlify from '@astrojs/netlify/edge-functions';

export default defineConfig({

adapter: netlify()

});

And that should be it! The next time you build, it will generate an SSR build compatible with Edge Functions, which can then be deployed with netlify deploy --build.

Partnerships

Netlify was Astro’s launch partner for SSR. Even within the short time since that announcement we have seen tremendous support from other hosting platforms with adapters either already been built or in the works.

If you’d like to build an adapter for another platform, swing by our Discord channel and we’d be happy to help you along!