Netlify
The easiest way to deploy your site is to use Netlify, as the themes are already set up for Netlify deployment.
- The
@astrojs/netlify
adapter is already installed - The
astro.config.mjs
file is already set up for Netlify deployment
Config File
This is what the astro.config.mjs
file looks like for Netlify deployment:
import netlify from "@astrojs/netlify";
// https://astro.build/configexport default defineConfig({ site: "https://yoursite.com", output: "hybrid", adapter: netlify({ imageCDN: false, }), // other config options});
Deploying
- Push your code to GitHub
- Create a Netlify account if you don’t already have one
- Follow the official Netlify documentation to deploy your site