astro vs gatsby
内容网站渲染与数据管线
astrogatsbySimilar Packages:

内容网站渲染与数据管线

比较按岛屿组织交互的 HTML 网站与 Gatsby 的 React 水合、source 插件数据管线。

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
astro10,746,27063,6793.49 MB12912 hours agoMIT
gatsby310,93655,9207.05 MB4609 months agoMIT

架构与集成

gatsby 用于构建 React 网站,其数据层可通过 source 插件接入 CMS 等服务。构建时查询生成页面内容,React 也可在水合后于浏览器获取变化的数据。它适合已经使用 Gatsby 插件及页面生成约定的团队。仅浏览器可用的代码仍须兼顾构建阶段的服务端渲染。

astro 是面向内容网站的替代路线,生成 HTML,并按需水合交互组件。它能使用 React 组件,但不是 Gatsby 的直接替换品。迁移需要重新处理路由、数据查询、图片和插件集成,现有 Gatsby GraphQL 查询不会自动转移。应按内容管线和交互需求选择,不预设任一框架总是更快。

选择与迁移

  • astro: 适合内容页面加按需交互岛屿;迁移时重做 Gatsby 数据查询及集成。

  • gatsby: 适合已有 React 页面、source 插件与构建查询的项目;构建时隔离浏览器专属代码。

How to Choose: astro vs gatsby

  • astro:

    适合内容页面加按需交互岛屿;迁移时重做 Gatsby 数据查询及集成。

  • gatsby:

    适合已有 React 页面、source 插件与构建查询的项目;构建时隔离浏览器专属代码。

README for astro


Build the web you want

Astro is the all-in-one web framework designed for speed.
Pull your content from anywhere and deploy everywhere, all powered by your favorite UI components and libraries.

Install

# Recommended!
npm create astro@latest

# Manual:
npm install astro

Looking for help? Start with our Getting Started guide.

Looking for quick examples? Open a starter project right in your browser.

Documentation

Visit our official documentation.

Support

Having trouble? Get help in the official Astro Discord.

Contributing

New contributors welcome! Check out our Contributors Guide for help getting started.

Join us on Discord to meet other contributors. We'll help you get your first contribution in no time!

Sponsors

Astro is generously supported by Cloudflare, Mux, Netlify, Webflow, and several other amazing organizations.

❤️ Sponsor Astro! ❤️