Astro is a web framework for building content-focused sites such as blogs, documentation and company pages. It can generate HTML at build time, render pages on the server or combine both approaches, depending on the configuration and adapter. It is not only a static site generator.
What Astro islands are
A page can ship as HTML without sending unnecessary interface JavaScript to the browser. If a part needs interaction, Astro lets you hydrate that component as an “island” and load code only for that part. Components can come from different UI frameworks, although adding several increases the weight and complexity of the project.
Astro also lets you organise content in collections and generate routes from files. That makes it easier to publish content with consistent templates and to check its structure at build time.
When does it suit you?
Astro can fit when most of the site is content and only some areas need interaction. For an application where nearly the whole screen changes in response to data or actions, also compare application-focused frameworks. The choice depends on the rendering pattern, the integrations and the team that will maintain the code.
How to publish an Astro site
- Run the build command defined by the project, usually
npm run build. - Check in the configuration whether the output is static or needs server rendering. Not every configuration produces only HTML files.
- If it is static, publish the output directory given by the configuration (often
dist). If it needs SSR, choose an environment compatible with the selected adapter and runtime. - Test deep routes, images, internal links and public variables on the deployment, not only on
localhost.
See the guide to deploying Astro from Git for an example of static output. Hostbrid Projects can serve the static result; verify the rendering type before connecting the repository. If the app needs a persistent process, compare the VPS options.
Related reading: Web applications: what they are, types and publishing.