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/blog/2019-11-21-how-to-convert-an-existing-gatsby-blog-to-use-mdx/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,15 @@ It can be a big tricky to add MDX to an existing blog. The following 5 steps wil
21
21
22
22
You can also see the [full changes in PR #19580](https://github.com/gatsbyjs/gatsby/pull/19580/files) for an overview of the changes you have to make to get MDX working. As stated above, this introduces changes to [Gatsby's blog starter](https://github.com/gatsbyjs/gatsby-starter-blog/tree/master), which you can install with Gatsby CLI.
23
23
24
-
```bash
24
+
```shell
25
25
gatsby new my-blog-starter https://github.com/gatsbyjs/gatsby-starter-blog
26
26
```
27
27
28
28
### Step 1
29
29
30
30
Install [gatsby-plugin-mdx](/packages/gatsby-plugin-mdx/), the official plugin for using MDX with Gatsby. Also install `gatsby-plugin-feed-mdx` for our RSS feeds. Finally, install `@mdx-js/mdx` and `@mdx-js/react`.
Copy file name to clipboardExpand all lines: docs/blog/2019-12-20-integrate-tinacms-with-your-gatsby-website/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Want to see a more advanced example of TinaCMS integrated with a Gatsby website?
24
24
25
25
First we need to get a local development environment set up for the site. Please reference the Gatsby Starter Blog [README](https://github.com/gatsbyjs/gatsby-starter-blog/#readme) for extra notes on this.
26
26
27
-
```bash
27
+
```shell
28
28
gatsby new tina-tutorial https://github.com/gatsbyjs/gatsby-starter-blog
29
29
cd tina-tutorial
30
30
```
@@ -33,7 +33,7 @@ cd tina-tutorial
33
33
34
34
As usual when setting up a new tool, we need to install a few packages. We will install `gatsby-plugin-tinacms`, which sets up the core Tina functionality. Along with that, we'll need the peer-dependency, `styled-components`, to keep the sidebar pretty. Since this site uses markdown, we'll install `gatsby-tinacms-remark`. And `gatsby-tinacms-git` will setup our Git API.
Copy file name to clipboardExpand all lines: docs/blog/2020-01-08-git-workflows/index.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,12 +105,12 @@ In this alternative flow, we're _leveraging_ Git to show us what work needs to b
105
105
106
106
Once we've fixed all the conflicts, we can finish up our rebase by running the following:
107
107
108
-
```bash
108
+
```shell
109
109
# stage all the changes we just made
110
-
$ git add .
110
+
git add .
111
111
112
112
# wrap up the rebase
113
-
$ git rebase --continue
113
+
git rebase --continue
114
114
```
115
115
116
116
After rebasing, our Git branches look like this:
@@ -129,8 +129,8 @@ You'll notice that our `C` commit—the only commit in our `pt2` branch—has be
129
129
130
130
Because we've rewritten the history, by turning `C` into `E`, we need to force-push to update our PR on GitHub:
131
131
132
-
```bash
133
-
$ git push origin feat/headless-cms-pt2 -f
132
+
```shell
133
+
git push origin feat/headless-cms-pt2 -f
134
134
```
135
135
136
136
### Merging PRs
@@ -228,9 +228,9 @@ The Git history pollution isn't a huge deal, since we'll have the chance to squa
228
228
229
229
If you do wind up squash-merging a branch, you'll need to manually snip out the duplicate commits. You can do this with an [interactive rebase](https://hackernoon.com/beginners-guide-to-interactive-rebasing-346a3f9c3a6d):
230
230
231
-
```bash
232
-
$ git checkout feat/headless-cms-pt2
233
-
$ git rebase -i feat/headless-cms
231
+
```shell
232
+
git checkout feat/headless-cms-pt2
233
+
git rebase -i feat/headless-cms
234
234
# A popup will open, presenting you with a list of commits.
235
235
# Delete the lines that contain work covered by the squashed
236
236
# commit. Save and close the file.
@@ -242,18 +242,18 @@ The work we're doing in this example to migrate to a headless CMS might take a w
242
242
243
243
To accomplish this, we'll do some more local rebasing:
244
244
245
-
```bash
245
+
```shell
246
246
# Update our local state
247
-
$ git checkout master
248
-
$ git pull origin master
247
+
git checkout master
248
+
git pull origin master
249
249
250
250
# Rebase our root branch
251
-
$ git checkout feat/headless-cms
252
-
$ git rebase master
251
+
git checkout feat/headless-cms
252
+
git rebase master
253
253
254
254
# Continue down the chain
255
-
$ git checkout feat/headless-cms-pt2
256
-
$ git rebase feat/headless-cms
255
+
git checkout feat/headless-cms-pt2
256
+
git rebase feat/headless-cms
257
257
```
258
258
259
259
Essentially, we're scooting all of our changes to happen _after_ the most recent commit on master. It's important to rebase instead of merge so that we don't "interleave" the changes from other branches—we're keeping all of our work tightly clustered for now. This can be a bit tedious if you have lots of incremental branches, so you may wish to hold off on this until you've merged everything into the root branch.
0 commit comments