#Host Astro + Solid JS on Netlify as a static site
3 messages · Page 1 of 1 (latest)
Hi @stoic forum. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, you can statically host an Astro site that uses the Island architecture and Solid JS on Netlify. Astro's Island architecture allows you to build interactive UI components that run in isolation from other components on the page. This architecture supports multiple UI frameworks, including Solid JS.
Astro's emphasis on minimized JavaScript usage and optimized loading times makes it ideal for static site generation. By default, your Astro project is a static site, and you don't need any extra configuration to deploy a static Astro site to Netlify.
Here's how you can deploy your Astro project to Netlify:
- Push your Astro project to a Git provider (like GitHub, GitLab, or Bitbucket).
- Create a new site on Netlify (https://app.netlify.com/start) and link the repository.
- Set the build command to
npm run buildand the publish directory todist/. - Click on
Deploy site.
You can find more detailed instructions in the Astro documentation (https://docs.astro.build/en/guides/deploy/netlify#project-configuration).
Remember, even though your site uses a UI framework like Solid JS, it doesn't mean you need a server running all the time. Astro compiles your components to static HTML and CSS during the build process, and the resulting site can be hosted on any static site hosting service, like Netlify, without the need for a server.
Sources:
- Astro Documentation: Deploy your Astro Site to Netlify (https://docs.astro.build/en/guides/deploy/netlify#_top)
- Astro Documentation: What is an island? (https://docs.astro.build/en/concepts/islands#what-is-an-island)