UNPKG

7.67 kBMarkdownView Raw
1<p align="center">
2 <a href="https://gatsbyjs.org">
3 <img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="60" />
4 </a>
5</p>
6<h1 align="center">
7 Gatsby v2
8</h1>
9
10<h3 align="center">
11 ⚛️ 📄 :rocket:
12</h3>
13<p align="center">
14 <strong>Blazing fast modern site generator for React</strong><br>
15 Go beyond static sites: build blogs, ecommerce sites, full-blown apps, and more with Gatsby.
16</p>
17<p align="center">
18 <a href="https://github.com/gatsbyjs/gatsby/blob/master/LICENSE">
19 <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Gatsby is released under the MIT license." />
20 </a>
21 <a href="https://travis-ci.org/gatsbyjs/gatsby">
22 <img src="https://travis-ci.org/gatsbyjs/gatsby.svg?branch=master" alt="Current TravisCI build status." />
23 </a>
24 <a href="https://www.npmjs.org/package/gatsby">
25 <img src="https://img.shields.io/npm/v/gatsby.svg?style=flat-square" alt="Current npm package version." />
26 </a>
27 <a href="https://npmcharts.com/compare/gatsby?minimal=true">
28 <img src="https://img.shields.io/npm/dm/gatsby.svg" alt="Downloads per month on npm." />
29 </a>
30 <a href="https://gatsbyjs.org/contributing/how-to-contribute/">
31 <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
32 </a>
33</p>
34
35<h3 align="center">
36 <a href="https://gatsbyjs.org/docs/">Quickstart</a>
37 <span> · </span>
38 <a href="https://gatsbyjs.org/tutorial/">Tutorial</a>
39 <span> · </span>
40 <a href="https://gatsbyjs.org/plugins/">Plugins</a>
41 <span> · </span>
42 <a href="https://gatsbyjs.org/docs/gatsby-starters/">Starters</a>
43 <span> · </span>
44 <a href="https://gatsbyjs.org/showcase/">Showcase</a>
45 <span> · </span>
46 <a href="https://gatsbyjs.org/contributing/how-to-contribute/">Contribute</a>
47 <span> · </span>
48 Support: <a href="https://spectrum.chat/gatsby-js">Spectrum</a>
49 <span> & </span>
50 <a href="https://gatsby.dev/discord">Discord</a>
51</h3>
52
53Gatsby is a modern framework for blazing fast websites.
54
55- **Go Beyond Static Websites.** Get all the benefits of static websites with none of the
56 limitations. Gatsby sites are fully functional React apps, so you can create high-quality,
57 dynamic web apps, from blogs to ecommerce sites to user dashboards.
58
59- **Use a Modern Stack for Every Site.** No matter where the data comes from, Gatsby sites are
60 built using React and GraphQL. Build a uniform workflow for you and your team, regardless of
61 whether the data is coming from the same backend.
62
63- **Load Data From Anywhere.** Gatsby pulls in data from any data source, whether it’s Markdown
64 files, a headless CMS like Contentful or WordPress, or a REST or GraphQL API. Use source plugins
65 to load your data, then develop using Gatsby’s uniform GraphQL interface.
66
67- **Performance Is Baked In.** Ace your performance audits by default. Gatsby automates code
68 splitting, image optimization, inlining critical styles, lazy-loading and prefetching resources,
69 and more to ensure your site is fast — no manual tuning required.
70
71- **Host at Scale for Pennies.** Gatsby sites don’t require servers, so you can host your entire
72 site on a CDN for a fraction of the cost of a server-rendered site. Many Gatsby sites can be
73 hosted entirely free on services like GitHub Pages and Netlify.
74
75[**Learn how to use Gatsby for your next project.**](https://gatsbyjs.org/docs/)
76
77## What’s In This Document
78
79- [Get Up and Running in 5 Minutes](#-get-up-and-running-in-5-minutes)
80- [Learning Gatsby](#-learning-gatsby)
81- [Migration Guides](#-migration-guides)
82- [How to Contribute](#-how-to-contribute)
83- [Thanks to Our Contributors and Sponsors](#-thanks-to-our-contributors-and-sponsors)
84
85## 🚀 Get Up and Running in 5 Minutes
86
87You can get a new Gatsby site up and running on your local dev environment in 5 minutes with these three steps:
88
891. **Create a Gatsby site from a Gatsby starter.**
90
91 Get your Gatsby blog set up in a single command:
92
93 ```shell
94 # create a new Gatsby site using the default starter
95 gatsby new my-blazing-fast-site
96 ```
97
982. **Start the site in `develop` mode.**
99
100 Next, move into your new site’s directory and start it up:
101
102 ```shell
103 cd my-blazing-fast-site/
104 npm run develop
105 ```
106
1073. **Open the source code and start editing!**
108
109 Your site is now running at `http://localhost:8000`. Open the `my-blazing-fast-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!
110
111At this point, you’ve got a fully functional Gatsby website. For additional information on how you can customize your Gatsby site, see our [plugins](https://gatsbyjs.org/plugins/) and [the official tutorial](https://gatsbyjs.org/tutorial/).
112
113## 🎓 Learning Gatsby
114
115Full documentation for Gatsby lives [on the website](https://gatsbyjs.org/).
116
117- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
118
119- **To dive straight into code samples head [to our documentation](https://gatsbyjs.org/docs/).** In particular, check out the “Guides”, API reference, and “Advanced Tutorials” sections in the sidebar.
120
121We welcome suggestions for improving our docs. See the [“how to contribute”](https://gatsbyjs.org/contributing/how-to-contribute/) documentation for more details.
122
123**Start Learning Gatsby: [Follow the Tutorial](https://gatsbyjs.org/tutorial/) · [Read the Docs](https://gatsbyjs.org/docs/)**
124
125## 💼 Migration Guides
126
127Already have a Gatsby site? These handy guides will help you add the improvements of Gatsby v2 to your site without starting from scratch!
128
129- [Migrate a Gatsby site from v1 to v2](https://gatsbyjs.org/docs/migrating-from-v1-to-v2/)
130- Still on v0? Start here: [Migrate a Gatsby site from v0 to v1](https://gatsbyjs.org/docs/migrating-from-v0-to-v1/)
131
132## 🤝 How to Contribute
133
134Whether 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! :muscle::purple_heart:
135
136Check out our [contributor onboarding docs](https://gatsbyjs.org/contributing/how-to-contribute/) for ideas on contributing and setup steps for getting our repos up and running on your local machine.
137
138[**Read the Contributing Guide**](https://gatsbyjs.org/contributing/how-to-contribute/)
139
140### Code of Conduct
141
142Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our [Code of Conduct](https://gatsbyjs.org/contributing/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. 💪💜
143
144[**Read the Code of Conduct**](https://gatsbyjs.org/contributing/code-of-conduct/)
145
146### A note on how this repository is organized
147
148This repository is a [monorepo](https://trunkbaseddevelopment.com/monorepos/) managed using [Lerna](https://github.com/lerna/lerna). This means there are [multiple packages](/packages) managed in this codebase, even though we publish them to NPM as separate packages.
149
150### Contributing to Gatsby v1
151
152We are currently only accepting bug fixes for Gatsby v1. No new features will be accepted.
153
154## 💜 Thanks to Our Contributors and Sponsors
155
156Thanks to our many contributors and sponsors as well as the companies sponsoring
157our testing and hosting infrastructure: [Travis CI](https://travis-ci.com/), [Appveyor](https://www.appveyor.com/), and [Netlify](https://www.netlify.com/).