You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/conceptual/gatsby-for-ecommerce.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
title: Using Gatsby For E-commerce
3
3
---
4
4
5
-
import { Announcement } from "gatsby-interface"
6
-
7
5
Businesses selling products online typically need a variety of software to support their experience. At a minimum, their website needs product pages, product catalog navigation, a shopping cart, and checkout.
8
6
9
7
Most have additional functionality like customer account creation, promotions, discounts, and loyalty, customer reviews, tax calculation, user tracking via analytics, and content personalization.
@@ -42,7 +40,7 @@ E-commerce tends to have a number of specific requirements. When building a Gats
42
40
43
41
## Additional resources:
44
42
45
-
<Announcement style={{ marginBottom: "1.5rem" }}>
43
+
<Announcement>
46
44
47
45
Check out our [e-commerce demo](https://shopify-demo.gatsbyjs.com/) built with our Shopify Starter, a proof of concept showcasing 10,000 products and 30,000 SKUs (variants).
48
46
Clone our Shopify Starter, host it on Gatsby and connect it to your own Shopify data to develop your own proof of concept in as little as an hour.
Copy file name to clipboardExpand all lines: docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,6 @@ title: "Creating a Source Plugin"
3
3
tableOfContentsDepth: 2
4
4
---
5
5
6
-
import { Announcement } from "gatsby-interface"
7
-
8
6
Source plugins are reusable integrations with content and data backends. There are already [100s of ready-to-use source plugins for popular content APIs](/plugins/?=gatsby-source) like Contentful, Drupal, and WordPress. This tutorial teaches you how to build your own integration.
9
7
10
8
In this tutorial, you'll create your own source plugin that will gather data from an API. The plugin will source data, optimize remote images, and create foreign key relationships between data sourced by your plugin.
@@ -556,7 +554,7 @@ if (fileNode) {
556
554
557
555
By using [`createNodeField`](/docs/reference/config-files/actions/#createNodeField) you're extending the existing node and place a new field named `localFile` under the `fields` key.
558
556
559
-
<Announcement style={{marginBottom: "1.5rem"}}>
557
+
<Announcement>
560
558
561
559
**Note:** Do not mutate the `node` directly and use `createNodeField` instead. Otherwise the change won't be persisted and you might see inconsistent data. This behavior changed with Gatsby 4, read the [migration guide](/docs/reference/release-notes/migrating-from-v3-to-v4/#dont-mutate-nodes-outside-of-expected-apis) to learn more.
Copy file name to clipboardExpand all lines: docs/docs/reference/release-notes/migrating-source-plugin-from-v3-to-v4.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
title: Upgrade Your Source Plugins for Gatsby 4
3
3
---
4
4
5
-
import { Announcement } from "gatsby-interface"
6
-
7
5
Gatsby 4 is here! Following on the heels of Gatsby 3, Gatsby 4 further improves build performance and introduces new parallel processing capabilities. In the guide below, we'll walk you through preparing your source plugin for Gatsby 4. You'll find this guide useful if you are a maintainer for a source plugin (as opposed to a consumer using a source plugin in your Gatsby site).
8
6
9
7
Introducing support for Gatsby 4 in your source plugin can be accomplished by ensuring your code adopts the 4 following changes. Many plugins already had the majority of their code organized the way it needed to be!
@@ -12,7 +10,7 @@ With Gatsby 4, Core APIs are being split into different processes so they're abl
12
10
13
11
It's time to get into it! The rest of this guide outlines the breaking changes in Gatsby 4 and some quick ways to resolve them. Find something confusing? Let us know in the [GitHub discussion](https://github.com/gatsbyjs/gatsby/discussions/33199) and we'll respond as fast as possible.
14
12
15
-
<Announcement style={{marginBottom: "1.5rem"}}>
13
+
<Announcement>
16
14
17
15
**Looking for examples of source plugins that support Gatsby 4?** Check out [`gatsby-source-wordpress`](/plugins/gatsby-source-wordpress/) and [`gatsby-source-shopify`](/plugins/gatsby-source-shopify/).
@@ -23,7 +23,7 @@ By the end of this part of the Tutorial, you will:
23
23
24
24
The Tutorial is intended to be as approachable as possible for people who are new to Gatsby and React. With that said, if you are brand new to web development (welcome!), you might find it helpful to learn some fundamentals first.
25
25
26
-
<Announcementstyle={{ marginBottom: "1.5rem" }}>
26
+
<Announcement>
27
27
Don't worry, you don't need to be an expert with these! A high-level
28
28
understanding of the basics should be enough. You'll pick up a lot through the
29
29
course of the Tutorial.
@@ -94,7 +94,7 @@ brew -v
94
94
xcode-select --install
95
95
```
96
96
97
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
97
+
<Announcement>
98
98
99
99
If that fails, download it [directly from Apple's site](https://developer.apple.com/download/more/), after signing-in with an Apple developer account.
100
100
@@ -111,7 +111,7 @@ If that fails, download it [directly from Apple's site](https://developer.apple.
111
111
brew install node
112
112
```
113
113
114
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
114
+
<Announcement>
115
115
116
116
If you don't want to install it through Homebrew, download the latest Node.js version from [the official Node.js website](https://nodejs.org/en/), double click on the downloaded file and go through the installation process.
117
117
@@ -133,7 +133,7 @@ Download and install the latest Node.js version from [the official Node.js websi
133
133
134
134
Install nvm (Node Version Manager) and needed dependencies. nvm is used to manage Node.js and all its associated versions.
135
135
136
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
136
+
<Announcement>
137
137
138
138
When installing a package, if it asks for confirmation, type `y` and press enter.
139
139
@@ -145,7 +145,7 @@ Select your distro:
145
145
-[Arch, Manjaro and other pacman based distros](#arch-manjaro-and-other-pacman-based-distros)
146
146
-[Fedora, RedHat, and other dnf based distros](#fedora-redhat-and-other-dnf-based-distros)
147
147
148
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
148
+
<Announcement>
149
149
150
150
If the Linux distribution you are using is not listed here, please find instructions on the web.
151
151
@@ -268,7 +268,7 @@ Install the Gatsby CLI globally by running the command below. (Have an older ver
268
268
npm install -g gatsby-cli
269
269
```
270
270
271
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
271
+
<Announcement>
272
272
273
273
**Note:** When you install Gatsby and run it for the first time, you'll see a short message notifying you about anonymous usage data that is being collected for Gatsby commands. You can read more about how that data is pulled out and used in the [telemetry doc](/docs/telemetry).
274
274
@@ -288,9 +288,9 @@ gatsby --help
288
288
289
289

290
290
291
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
291
+
<Announcement>
292
292
293
-
**Troubleshooting**
293
+
#### Troubleshooting
294
294
295
295
If you are unable to successfully run the Gatsby CLI due to a permissions issue, you may want to check out the [npm docs on fixing permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions), or [this guide](https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md).
296
296
@@ -315,7 +315,7 @@ In this Tutorial, you will deploy your site using Gatsby Cloud. To use Gatsby Cl
315
315
316
316
Now that you have all the knowledge and tools you'll need, you're ready for the Tutorial!
@@ -30,7 +30,7 @@ First, you write the code for your Gatsby site from your computer. When you're r
30
30
31
31
</Collapsible>
32
32
33
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
33
+
<Announcement>
34
34
35
35
**Prefer a video?**
36
36
@@ -58,7 +58,7 @@ To create your first Gatsby site, you're going to use a command from the Gatsby
58
58
59
59

60
60
61
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
61
+
<Announcement>
62
62
63
63
**Note:** For this Tutorial, your Gatsby CLI should be v4.8 or newer. To check what version you have installed, run the following command:
64
64
@@ -88,7 +88,7 @@ cd Desktop
88
88
gatsby new
89
89
```
90
90
91
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
91
+
<Announcement>
92
92
93
93
**Having trouble with `gatsby new`?** If you had trouble globally installing `gatsby-cli` in Part 0, you can also create a new site by running `npm init gatsby` from the command line instead of `gatsby new`.
94
94
@@ -116,7 +116,7 @@ Will you be using JavaScript or TypeScript?
116
116
TypeScript
117
117
```
118
118
119
-
<Announcementstyle={{marginBottom: "1.5rem"}}>
119
+
<Announcement>
120
120
121
121
This tutorial doesn't require any prior TypeScript knowledge as it uses JavaScript. If you're familiar with TypeScript you can read the [Gatsby and TypeScript guide](/docs/how-to/custom-configuration/typescript/) to learn about typings, files, and conventions. If you want to use TypeScript we recommend going through the tutorial first and then only afterwards convert the project to TypeScript.
122
122
@@ -129,7 +129,7 @@ This tutorial doesn't require any prior TypeScript knowledge as it uses JavaScri
129
129
· No (or I'll add it later)
130
130
```
131
131
132
-
<Announcement style={{marginBottom: "1.5rem"}}>
132
+
<Announcement>
133
133
134
134
In the future, you can use these options to tell `gatsby new` what features you want to add to your site, and `gatsby new` will automatically configure them for you. It's a much quicker way to set up new projects.
135
135
@@ -196,7 +196,7 @@ To start up your development server, do the following:
196
196
cd my-first-gatsby-site
197
197
```
198
198
199
-
<Announcement style={{marginBottom: "1.5rem"}}>
199
+
<Announcement>
200
200
201
201
**Tip:** Whenever you want to run any commands foryour site, you need to bein the context for that site. That is, your command line needs to be pointed at the directory where your site's code lives.
202
202
@@ -208,7 +208,7 @@ cd my-first-gatsby-site
208
208
gatsby develop
209
209
```
210
210
211
-
<Announcement style={{marginBottom: "1.5rem"}}>
211
+
<Announcement>
212
212
213
213
If you weren't able to install the Gatsby command line interface globally, you can start your development server using the following command instead:
214
214
@@ -239,7 +239,7 @@ And there it is: your very first Gatsby site! 🎉
239
239
240
240
You'll be able to visit the site locally at `http://localhost:8000/`for as long as your development server is running. (That's the process you started by running the `gatsby develop` command.) To stop running that process (or to “stop running the development server”), go back to your terminal window, hold down the “control” key, and then hit “c” (`ctrl-c`). To start it again, run `gatsby develop` again!
241
241
242
-
<Announcement style={{marginBottom: "1.5rem"}}>
242
+
<Announcement>
243
243
244
244
**Note:** If you are using VM setup like vagrant and/or would like to listen on your local IP address, run `gatsby develop --host=0.0.0.0`. Now, the development server listens on both `http://localhost` and your local IP.
245
245
@@ -265,7 +265,7 @@ GitHub is a website that many developers use to back up and share their code onl
265
265
git push -u origin main
266
266
```
267
267
268
-
<Announcement style={{marginBottom: "1.5rem"}}>
268
+
<Announcement>
269
269
270
270
**Using GitHub for the first time?**
271
271
@@ -293,7 +293,7 @@ To connect your code on GitHub to your Gatsby Cloud account, do the following:
293
293
294
294
1. If this is your first time connecting GitHub to Gatsby Cloud, you'll need to give Gatsby Cloud permission to access your GitHub account.
295
295
296
-
<Announcement style={{marginBottom: "1.5rem"}}>
296
+
<Announcement>
297
297
298
298
**Note:** If you are part of more than one GitHub organization, you will need to first selectthe organization with which the repository resides at this step before selecting the repository itself.
299
299
@@ -323,7 +323,7 @@ You did it! Your Gatsby site is now online! 👏
323
323
324
324
Every time you push a new change to the main branch of your GitHub repo, Gatsby Cloud will see the changes and automatically start a build for the new version of your site.
325
325
326
-
<Announcement style={{marginBottom: "1.5rem"}}>
326
+
<Announcement>
327
327
328
328
**Tip:** There will be a unique URL foreach build (like `https://build-49535320-b3ae-4761-bbeb-f8f7fa07e0fc.gtsb.io/`), and a URL that always has the latest build (like `my-first-gatsby-site-main.gatsbyjs.io`). You'll mostly want to share the human-readable URL, so that people can always see the most up-to-date version of your site. Butin some cases (like when you're trying to debug a specific build of your site) it can be helpful to use the unique build URL.
329
329
@@ -354,7 +354,7 @@ First, you write the code for your Gatsby site from your computer. When you're r
354
354
- Gatsby Cloud is an infrastructure platform specifically optimized for building, deploying, and hosting Gatsby sites.
355
355
- When you push a new commit to the `main` branch of the GitHub repository for your site, Gatsby Cloud will detect the changes, rebuild a new version of your site, and then redeploy it.
0 commit comments