Draft:Astro (web framework)

Content-focused web development framework From Wikipedia, the free encyclopedia

Astro is a free and open-source web framework owned by Cloudflare, Inc. designed for content-driven websites. It provides static site generation and supports multiple frontend JavaScript libraries.

Original authorsFred Schott, Nate Moore
DevelopersCloudflare and the open-source community[1]
Initial releaseJune 8, 2021; 4 years ago (2021-06-08)[2]
Quick facts Astro, Original authors ...
Astro
Original authorsFred Schott, Nate Moore
DevelopersCloudflare and the open-source community[1]
Initial releaseJune 8, 2021; 4 years ago (2021-06-08)[2]
Written inJavaScript, TypeScript
Operating systemCross-platform
PlatformWeb platform
LicenseMIT License
Websiteastro.build
Repositorygithub.com/withastro/astro
Close

Astro generates static content on the server but enables reactive user interfaces through the use of the islands architecture, an idea coined by Etsy engineer Katie Sylor-Miller in 2019.[3] Developers mark components which require client-side JavaScript. At build time, each page is saved as plain HTML with zero client-side JavaScript. Directives specify when each interactive component hydrates, which allows Astro to only load client-side JavaScript when needed.[4]

History

Astro was created by Fred Schott and the open-source development team behind Snowpack and Skypack. Skypack was a JavaScript CDN that allowed developers to load npm packages directly in the browser without a build step. While optimizing package delivery, the team developed Astro as a build tool which identified exactly which JavaScript each page required, reducing unnecessary network requests.[5]

The first public beta was released on June 8, 2021 under an MIT license.[6]

On January 16, 2026, Cloudflare, Inc. acquired Astro. In the press release, Cloudflare stated that Astro would remain open source and that they would continue to support open source contributions via the Astro Ecosystem Fund.[7][8]

Features

Static site generation

Astro is designed as a static site generator which allows developers to use component-based JavaScript frameworks like React as templating systems while still generating static HTML output. This places Astro between traditional site generators like Jekyll or Eleventy, which use templating languages, and frontend-driven ones like Gatsby, which ship JavaScript-heavy output.[5]

Because Astro generates static HTML at build time, pages are directly crawlable by search engines without requiring JavaScript execution. This also allows meta tags and Open Graph data to be read by social media crawlers, enabling link previews on platforms such as Facebook and X.[9]

Content management

Astro includes a content collections system for organizing content such as Markdown files. A content collection is a set of structurally identical data, which can be stored locally in the file system, or fetched from a remote source like a CMS. The content collections system allows for the creation of schemas, which can validate the shapes of each entry.[10]

The feature was expanded with the Content Layer API, which added support for data from multiple sources, local caching between builds, and maintained the type safety layer.[11] Astro uses an embedded SQLite database to improve scalability as well as enabling caching between builds.[12]

View transitions

While view transitions such as fading, sliding, and persistent elements were traditionally only possible in JavaScript single-page applications, the View Transitions API has been implemented by browsers to add transition support for multi-page applications. Astro 3.0, released on August 30, 2023, added support for the API, becoming the first major web framework to do so.[13]

Framework agnosticism

From the first beta release, Astro was designed to support components from different JavaScript web frameworks, such as React, Svelte, and Vue. This allows developers to mix components from multiple frameworks in one project rather than committing to one throughout.[6]

Ecosystem

The Astro team maintains Starlight, a documentation theme built on top of the framework. Starlight provides support for internationalization,[14] sidebar navigation,[15] and site search powered by Pagefind.[16]

Developer tooling has included official and community-made integrations for Astro, such as the Biome formatter[17] and the ESLint linter.[18]

References

Related Articles

Wikiwand AI