Skip to content

将你的 Astro 站点部署到 Edgio

你可以将 Astro 项目部署到 Edgio,这是一个边缘和 CDN 平台,用于部署、保护和加速网站和 API。

¥You can deploy your Astro project to Edgio, an edge and CDN platform to deploy, protect and accelerate websites and APIs.

¥How to deploy

  1. Install the Edgio CLI globally from the Terminal, if you haven’t already.

    终端窗口
    npm install -g @edgio/cli
  2. Add Edgio to your Astro site

    终端窗口
    edgio init
  3. (Optional) Enable Server Side Rendering

    After you’ve set up @astrojs/node with Astro, specify the server file path in edgio.config.js as below:

    edgio.config.js
    import { join } from 'path'
    module.exports = {
    astro: {
    // The path of the standalone server that runs Astro SSR.
    // The dependencies for this file are automatically bundled.
    appPath: join(process.cwd(), 'dist', 'server', 'entry.mjs'),
    },
    };
  4. Deploy to Edgio

    终端窗口
    edgio deploy

更多部署指南

Astro 中文网 - 粤ICP备13048890号