Skip to content

Commit cb92dfe

Browse files
authored
chore(docs): Switch to Announcement shortcode (#36628)
1 parent f088369 commit cb92dfe

File tree

12 files changed

+109
-117
lines changed

12 files changed

+109
-117
lines changed

docs/docs/conceptual/gatsby-for-ecommerce.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Using Gatsby For E-commerce
33
---
44

5-
import { Announcement } from "gatsby-interface"
6-
75
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.
86

97
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
4240

4341
## Additional resources:
4442

45-
<Announcement style={{ marginBottom: "1.5rem" }}>
43+
<Announcement>
4644

4745
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).
4846
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.

docs/docs/conceptual/rendering-options.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Rendering Options
33
---
44

5-
import { Announcement } from "gatsby-interface"
6-
75
Gatsby is historically known as a static site generator enhanced with [React Hydration][1].
86
But starting with Gatsby 4, you can choose alternative rendering options in addition to static site generation (SSG) — on a per-page basis.
97
This type of granular control allows you to optimize for performance and productivity without sacrificing one for the other.
@@ -14,7 +12,7 @@ A rendering option defines the stage at which your page's user-facing HTML is ge
1412
(SSG or pre-rendering), during HTTP request (server-side rendering) or locally in the browser
1513
with Javascript (client-side rendering).
1614

17-
<Announcement style={{marginBottom: "1.5rem"}}>
15+
<Announcement>
1816

1917
For an in-depth explanation of each of those approaches and their trade-offs we
2018
highly recommend the ["Rendering on the Web"][3] article from the Chrome team.
@@ -35,7 +33,7 @@ How does SSG work?
3533

3634
This mode provides the most pleasant user experience, the highest level of security, and run-time scalability for your site.
3735

38-
<Announcement style={{marginBottom: "1.5rem"}}>
36+
<Announcement>
3937

4038
**Note:** SSG doesn't mean your site is not dynamic. You can still use JavaScript to communicate with any APIs,
4139
add private sections of your site for authorized users via [client-side rendering][4] and

docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: "Creating a Source Plugin"
33
tableOfContentsDepth: 2
44
---
55

6-
import { Announcement } from "gatsby-interface"
7-
86
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.
97

108
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) {
556554
557555
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.
558556
559-
<Announcement style={{marginBottom: "1.5rem"}}>
557+
<Announcement>
560558
561559
**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.
562560

docs/docs/reference/release-notes/migrating-source-plugin-from-v3-to-v4.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Upgrade Your Source Plugins for Gatsby 4
33
---
44

5-
import { Announcement } from "gatsby-interface"
6-
75
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).
86

97
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
1210

1311
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.
1412

15-
<Announcement style={{marginBottom: "1.5rem"}}>
13+
<Announcement>
1614

1715
**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/).
1816

docs/docs/tutorial/part-0/index.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Part 0: Set Up Your Development Environment"
33
tableOfContentsDepth: 2
44
---
55

6-
import { Announcement, LinkButton } from "gatsby-interface"
6+
import { LinkButton } from "gatsby-interface"
77
import Collapsible from "@components/collapsible"
88
import { MdArrowForward } from "react-icons/md"
99

@@ -23,7 +23,7 @@ By the end of this part of the Tutorial, you will:
2323

2424
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.
2525

26-
<Announcement style={{ marginBottom: "1.5rem" }}>
26+
<Announcement>
2727
Don't worry, you don't need to be an expert with these! A high-level
2828
understanding of the basics should be enough. You'll pick up a lot through the
2929
course of the Tutorial.
@@ -94,7 +94,7 @@ brew -v
9494
xcode-select --install
9595
```
9696

97-
<Announcement style={{marginBottom: "1.5rem"}}>
97+
<Announcement>
9898

9999
If that fails, download it [directly from Apple's site](https://developer.apple.com/download/more/), after signing-in with an Apple developer account.
100100

@@ -111,7 +111,7 @@ If that fails, download it [directly from Apple's site](https://developer.apple.
111111
brew install node
112112
```
113113

114-
<Announcement style={{marginBottom: "1.5rem"}}>
114+
<Announcement>
115115

116116
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.
117117

@@ -133,7 +133,7 @@ Download and install the latest Node.js version from [the official Node.js websi
133133

134134
Install nvm (Node Version Manager) and needed dependencies. nvm is used to manage Node.js and all its associated versions.
135135

136-
<Announcement style={{marginBottom: "1.5rem"}}>
136+
<Announcement>
137137

138138
When installing a package, if it asks for confirmation, type `y` and press enter.
139139

@@ -145,7 +145,7 @@ Select your distro:
145145
- [Arch, Manjaro and other pacman based distros](#arch-manjaro-and-other-pacman-based-distros)
146146
- [Fedora, RedHat, and other dnf based distros](#fedora-redhat-and-other-dnf-based-distros)
147147

148-
<Announcement style={{marginBottom: "1.5rem"}}>
148+
<Announcement>
149149

150150
If the Linux distribution you are using is not listed here, please find instructions on the web.
151151

@@ -268,7 +268,7 @@ Install the Gatsby CLI globally by running the command below. (Have an older ver
268268
npm install -g gatsby-cli
269269
```
270270

271-
<Announcement style={{marginBottom: "1.5rem"}}>
271+
<Announcement>
272272

273273
**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).
274274

@@ -288,9 +288,9 @@ gatsby --help
288288

289289
![Check Gatsby commands in terminal](05-gatsby-help.png)
290290

291-
<Announcement style={{marginBottom: "1.5rem"}}>
291+
<Announcement>
292292

293-
**Troubleshooting**
293+
#### Troubleshooting
294294

295295
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).
296296

@@ -315,7 +315,7 @@ In this Tutorial, you will deploy your site using Gatsby Cloud. To use Gatsby Cl
315315

316316
Now that you have all the knowledge and tools you'll need, you're ready for the Tutorial!
317317

318-
<Announcement style={{marginBottom: "1.5rem"}}>
318+
<Announcement>
319319

320320
**Share Your Feedback!**
321321

docs/docs/tutorial/part-1/index.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Part 1: Create and Deploy Your First Gatsby Site"
33
---
44

5-
import { Announcement, LinkButton } from "gatsby-interface"
5+
import { LinkButton } from "gatsby-interface"
66
import Collapsible from "@components/collapsible"
77
import { MdArrowForward } from "react-icons/md"
88

@@ -30,7 +30,7 @@ First, you write the code for your Gatsby site from your computer. When you're r
3030

3131
</Collapsible>
3232

33-
<Announcement style={{marginBottom: "1.5rem"}}>
33+
<Announcement>
3434

3535
**Prefer a video?**
3636

@@ -58,7 +58,7 @@ To create your first Gatsby site, you're going to use a command from the Gatsby
5858

5959
![The welcome message for the interactive "gatsby new" command.](./gatsby-new-cli.png)
6060

61-
<Announcement style={{marginBottom: "1.5rem"}}>
61+
<Announcement>
6262

6363
**Note:** For this Tutorial, your Gatsby CLI should be v4.8 or newer. To check what version you have installed, run the following command:
6464

@@ -88,7 +88,7 @@ cd Desktop
8888
gatsby new
8989
```
9090

91-
<Announcement style={{marginBottom: "1.5rem"}}>
91+
<Announcement>
9292

9393
**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`.
9494

@@ -116,7 +116,7 @@ Will you be using JavaScript or TypeScript?
116116
TypeScript
117117
```
118118

119-
<Announcement style={{marginBottom: "1.5rem"}}>
119+
<Announcement>
120120

121121
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.
122122

@@ -129,7 +129,7 @@ This tutorial doesn't require any prior TypeScript knowledge as it uses JavaScri
129129
· No (or I'll add it later)
130130
```
131131
132-
<Announcement style={{marginBottom: "1.5rem"}}>
132+
<Announcement>
133133
134134
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.
135135

@@ -196,7 +196,7 @@ To start up your development server, do the following:
196196
cd my-first-gatsby-site
197197
```
198198
199-
<Announcement style={{marginBottom: "1.5rem"}}>
199+
<Announcement>
200200
201201
**Tip:** Whenever you want to run any commands for your site, you need to be in the context for that site. That is, your command line needs to be pointed at the directory where your site's code lives.
202202
@@ -208,7 +208,7 @@ cd my-first-gatsby-site
208208
gatsby develop
209209
```
210210
211-
<Announcement style={{marginBottom: "1.5rem"}}>
211+
<Announcement>
212212
213213
If you weren't able to install the Gatsby command line interface globally, you can start your development server using the following command instead:
214214
@@ -239,7 +239,7 @@ And there it is: your very first Gatsby site! 🎉
239239
240240
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!
241241
242-
<Announcement style={{marginBottom: "1.5rem"}}>
242+
<Announcement>
243243
244244
**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.
245245
@@ -265,7 +265,7 @@ GitHub is a website that many developers use to back up and share their code onl
265265
git push -u origin main
266266
```
267267
268-
<Announcement style={{marginBottom: "1.5rem"}}>
268+
<Announcement>
269269
270270
**Using GitHub for the first time?**
271271
@@ -293,7 +293,7 @@ To connect your code on GitHub to your Gatsby Cloud account, do the following:
293293
294294
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.
295295
296-
<Announcement style={{marginBottom: "1.5rem"}}>
296+
<Announcement>
297297
298298
**Note:** If you are part of more than one GitHub organization, you will need to first select the organization with which the repository resides at this step before selecting the repository itself.
299299
@@ -323,7 +323,7 @@ You did it! Your Gatsby site is now online! 👏
323323
324324
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.
325325
326-
<Announcement style={{marginBottom: "1.5rem"}}>
326+
<Announcement>
327327
328328
**Tip:** There will be a unique URL for each 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. But in 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.
329329
@@ -354,7 +354,7 @@ First, you write the code for your Gatsby site from your computer. When you're r
354354
- Gatsby Cloud is an infrastructure platform specifically optimized for building, deploying, and hosting Gatsby sites.
355355
- 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.
356356
357-
<Announcement style={{marginBottom: "1.5rem"}}>
357+
<Announcement>
358358
359359
**Share Your Feedback!**
360360

0 commit comments

Comments
 (0)