gatsby README

The project's README from github.com/gatsbyjs/gatsby. As one markdown file: README.md.

Gatsby

Gatsby

The future of web development is here.

Gatsby is a free and open-source framework based on React that helps developers build blazing fast websites and apps.
It combines the control and scalability of dynamically rendered sites with the speed of static-site generation, creating a whole new web of possibilities.

Gatsby is released under the MIT license. Current CircleCI build status. Current npm package version. Downloads per month on npm. Total downloads on npm. PRs welcome!

Quickstart · Tutorial · Plugins · Starters · Showcase · Contribute
Support: Discussions

Gatsby helps professional developers efficiently create maintainable, highly-performant, content-rich websites.

Learn how to use Gatsby for your next project.

🚀 Ship your first Gatsby site in 5 Minutes

Click the link below to quickly try the workflow of developing, building, and deploying websites with Gatsby and Netlify.

Deploy to Netlify

At the end of this process, you'll have

  1. a site working on Netlify
  2. a new repository that is linked to that new site
  3. as you push changes to your new repository, Netlify will automatically rebuild and redeploy your site!

💻 Get started with Gatsby locally in 5 Minutes

You can get a new Gatsby site up and running on your local dev environment in 5 minutes with these four steps:

  1. Initialize a new project.

    npm init gatsby
    

    Give it the name "My Gatsby Site".

  2. Start the site in develop mode.

    Next, move into your new site’s directory and start it up:

    cd my-gatsby-site/
    npm run develop
    
  3. Open the source code and start editing!

    Your site is now running at http://localhost:8000. Open the my-gatsby-site directory in your code editor of choice and edit src/pages/index.js. Save your changes, and the browser will update in real time!

At this point, you’ve got a fully functional Gatsby website. For additional information on how you can customize your Gatsby site, see our plugins and the official tutorial.

🎓 Learning Gatsby

Full documentation for Gatsby lives on the website.

We welcome suggestions for improving our docs. See the “how to contribute” documentation for more details.

Start Learning Gatsby: Follow the Tutorial · Read the Docs

🚢 Release Notes

Wondering what we've shipped recently? Check out our release notes for key highlights, performance improvements, new features, and notable bugfixes.

Also, read our documentation on version support to understand our plans for each version of Gatsby.

💼 Migration Guides

Already have a Gatsby site? These handy guides will help you add the improvements of Gatsby v5 to your site without starting from scratch!

❗ Code of Conduct

Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our Code of Conduct. Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. 💪💜

🤝 How to Contribute

Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the Gatsby community!

Check out our Contributing Guide for ideas on contributing and setup steps for getting our repositories up and running on your local machine.

A note on how this repository is organized

This repository is a monorepo managed using Lerna. This means there are multiple packages managed in this codebase, even though we publish them to NPM as separate packages.

📝 License

Licensed under the MIT License.

💜 Thanks

Thanks go out to all our many contributors creating plugins, starters, videos, and blog posts. And a special appreciation for our community members helping with issues and PRs, or answering questions on GitHub Discussions.

A big part of what makes Gatsby great is each and every one of you in the community. Your contributions enrich the Gatsby experience and make it better every day.

gatsby (gatsbyjs/gatsby)

Searching Database…

55.9K ·GitHub
这是什么?Gatsby 是一个免费开源的框架,基于 React 构建,用于开发快速的网站和网络应用,它把动态渲染网站的可控性与静态网站生成的高速结合在一起。
它是纯粹的静态网站生成器吗?静态生成是默认方式,但任何页面都可以改用延迟静态生成(Deferred Static Generation)或服务器端渲染(SSR)。最终得到的是一个功能完整的 React 应用——博客、电商、仪表盘都可以。
在本地把第一个网站跑起来是什么样的流程?先初始化一个新项目,进入项目目录,以开发模式启动网站,然后编辑 src/pages/index.js——浏览器会实时更新。README 说整个过程大约五分钟。
在创建项目之前,我的电脑上需要装什么?代码仓库要求 Node.js 18 或更高版本(低于 26),以及 npm 8+ 或 Yarn 1.17+。除此之外什么都不需要——开始构建时不需要数据库,也不依赖外部服务。
是不是所有东西都必须用 React 和 GraphQL 来写?是的——不管数据来自哪里,网站都是用 React 和 GraphQL 构建的,这就是你选定它时要接受的开发方式。
我做出来的网站到底在哪里运行?Gatsby 是一个基于 Node 的工具,运行在你自己的电脑上;它输出的就是普通的网站和网络应用,任何浏览器都能打开。
网站做好之后上线,还需要我自己准备服务器吗?不需要。Gatsby 建的网站不要求有服务器——整个网站可以托管在 CDN 上,很多人在 Netlify 这类服务上完全免费地运行网站。
我可以在商业项目里使用 Gatsby 吗?没有任何障碍:代码采用 MIT 许可证,商业使用完全没问题。
我的内容可以从哪里来?哪里都行——Markdown 文件、Contentful 或 WordPress 这类无头 CMS,或者 REST 或 GraphQL API。源插件会把它们全部加载到一个统一的 GraphQL 数据层里,方便你开发时使用。
不用我操心,它会自动做哪些性能优化?代码分割、图片优化、内联关键样式、懒加载和预加载都是自动完成的,所以网站默认就能在性能测试中拿到高分,完全不需要手动调优。
学习难度大吗?设计上很平缓:官方的深入教程从零基础讲起,不预设你的水平,一步一步带你走完每个环节,文档里还有操作指南、参考手册和概念讲解。
Creator
gatsbyjs
Size
1.1 GB
Stars
55.9K
Age
11y
Commits · 90 Days