The Wix Astro integration provides session management for your Astro project.
If you already have an Astro project and you want to add the Wix Astro integration to it, follow these steps:
- Install the Wix Astro integration package and the Wix CLI packages:
npm install @wix/astro @wix/cli @wix/cli-astro
- Add the Wix integration to your Astro project's
astro.config.mjs
file:
import wix from "@wix/astro-internal";
export default {
// ...
output: "server",
integrations: [wix()],
// ...
};
- Build your Astro project:
npm run build
- Create a
wix.config.json
at the root of your project:
{
"siteId": "<your site id>",
"projectId": "<your project id>"
}
- Deploy your Astro project to Wix:
npx wix astro deploy