Skip to content

Commit 1706d8f

Browse files
authored
docs(tutorial): finishing touches (#32833)
1 parent f06d803 commit 1706d8f

File tree

8 files changed

+66
-7
lines changed

8 files changed

+66
-7
lines changed

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

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { MdArrowForward } from 'react-icons/md'
1010

1111
Now that you've set up your computer with all the tools you'll need, it's time to get started!
1212

13-
Over the course of this Tutorial, you'll build and deploy your first Gatsby site: a blog site with support for images and MDX! (If that doesn't mean anything to you now, that's okay! It will by the time you reach the end.) Here's a [finished example](https://introworkshopexamplesitev3.gatsbyjs.io/) of the site you'll build.
13+
Over the course of this Tutorial, you'll build and deploy your first Gatsby site: a blog site with support for images and MDX! (If that doesn't mean anything to you now, that's okay! It will by the time you reach the end.) Here's a [finished example](https://gatsbytutorialexample.gatsbyjs.io/) of the site you'll build. You can also follow along with the [GitHub repository for the finished example](https://github.com/gatsbyjs/tutorial-example).
1414

1515
In this part of the Tutorial, you will go through the process of creating the template for your blog site and deploying it online for everyone to see.
1616

@@ -316,6 +316,13 @@ First, you write the code for your Gatsby site from your computer. When you're r
316316
317317
</Collapsible>
318318
319+
### Key takeaways
320+
321+
* To create a new Gatsby site from the command line, you can run the `gatsby new` command.
322+
* To run your site locally, use the `gatsby develop` command. You can view your site in a web browser at `localhost:8000`.
323+
* Gatsby Cloud is an infrastructure platform specifically optimized for building, deploying, and hosting Gatsby sites.
324+
* 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.
325+
319326
<Announcement style={{marginBottom: "1.5rem"}}>
320327
321328
**Share Your Feedback!**

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ You can also create components from other components. For example, you might dec
5151

5252
**Try it!**
5353

54-
Look back at the [finished example blog site](https://introworkshopexamplesitev3.gatsbyjs.io). How might you break down the pages into components?
54+
Look back at the [finished example blog site](https://gatsbytutorialexample.gatsbyjs.io/). How might you break down the pages into components?
5555

5656
Not sure where to start? Look for parts of the UI that repeat within a page or across multiple pages.
5757

@@ -387,7 +387,7 @@ export default AboutPage
387387
388388
## Create a reusable layout component
389389
390-
If you take another look at the [finished example blog](https://introworkshopexamplesitev3.gatsbyjs.io), you might notice that there are some repeated parts of the UI across each page, like the site title and the navigation menu.
390+
If you take another look at the [finished example blog](https://gatsbytutorialexample.gatsbyjs.io/), you might notice that there are some repeated parts of the UI across each page, like the site title and the navigation menu.
391391
392392
You could copy those elements into each page of your site separately. But imagine your site had dozens (or even thousands) of pages. If you wanted to make a change to the structure of your navigation menu, you'd have to go and update every one of those files separately. Yuck.
393393
@@ -758,6 +758,12 @@ Luckily, when you use CSS Modules with Gatsby, you can have both! Your kebab-cas
758758
759759
![A screenshot of the Home page. The styles have been updated so now the page title is in purple, and the navigation links at the top of the page are in a single line instead of a bulleted list.](./index-page-styled.png)
760760
761+
<Announcement style={{marginBottom: "1.5rem"}}>
762+
763+
**Want to see how it all fits together?** Check out the commit history in the [GitHub repo for the finished example site](https://github.com/gatsbyjs/tutorial-example).
764+
765+
</Announcement>
766+
761767
## Summary
762768
763769
Congratulations, you've made it to the end of Part 2! 🥳 (That was a long one!)

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

+6
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ export default IndexPage
245245

246246
![The home page of your site, which includes a different picture of a dog.](./index-page-with-static-image-from-filesystem.png)
247247

248+
<Announcement style={{marginBottom: "1.5rem"}}>
249+
250+
**Want to see how it all fits together?** Check out the commit history in the [GitHub repo for the finished example site](https://github.com/gatsbyjs/tutorial-example).
251+
252+
</Announcement>
253+
248254
## Summary
249255

250256
Take a moment to think back on what you've learned so far. Challenge yourself to answer the following questions from memory:

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

+6
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,12 @@ Good job! You've finished the first step of your new blog page.
846846

847847
You won't be able to render the contents of your posts just yet, since your site doesn't know how to process MDX. You'll fix that in the next part of the Tutorial!
848848

849+
<Announcement style={{marginBottom: "1.5rem"}}>
850+
851+
**Want to see how it all fits together?** Check out the commit history in the [GitHub repo for the finished example site](https://github.com/gatsbyjs/tutorial-example).
852+
853+
</Announcement>
854+
849855
## Summary
850856

851857
Take a moment to think back on what you've learned so far. Challenge yourself to answer the following questions from memory:

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

+6
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,12 @@ export default BlogPage
581581

582582
Nice work! Your site now has a blog page with actual content.
583583

584+
<Announcement style={{marginBottom: "1.5rem"}}>
585+
586+
**Want to see how it all fits together?** Check out the commit history in the [GitHub repo for the finished example site](https://github.com/gatsbyjs/tutorial-example).
587+
588+
</Announcement>
589+
584590
## Summary
585591

586592
Take a moment to think back on what you've learned so far. Challenge yourself to answer the following questions from memory:

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

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ By the end of this part of the Tutorial, you will be able to:
2323

2424
**Prefer a video?**
2525

26-
If you'd rather follow along with a video, here's a recording of a livestream that covers all the material for Part 5.
26+
If you'd rather follow along with a video, here's a recording of a livestream that covers all the material for Part 6.
2727

2828
You can catch the stream live on Wednesdays at 10AM Pacific Time / 5PM UTC on the [Gatsby Twitch channel](https://www.twitch.tv/gatsbyjs).
2929

@@ -534,6 +534,13 @@ The last step of Part 6 is to clean up your Blog page. Instead of rendering the
534534

535535
Congratulations, you now have a multi-page blog site! Try adding some new `.mdx` files to your top-level `blog` directory. They should get added to your Blog page automatically when your site rebuilds!
536536

537+
<Announcement style={{marginBottom: "1.5rem"}}>
538+
539+
**Want to see how it all fits together?** Check out the commit history in the [GitHub repo for the finished example site](https://github.com/gatsbyjs/tutorial-example).
540+
541+
</Announcement>
542+
543+
537544
## Summary
538545

539546
Take a moment to think back on what you've learned so far. Challenge yourself to answer the following questions from memory:
Loading

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

+24-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ By the end of this part of the Tutorial, you will be able to:
1616

1717
- Use the `GatsbyImage` component to create images dynamically from data.
1818

19+
<Announcement style={{marginBottom: "1.5rem"}}>
20+
21+
**Prefer a video?**
22+
23+
If you'd rather follow along with a video, here's a recording of a livestream that covers all the material for Part 7.
24+
25+
You can catch the stream live on Wednesdays at 10AM Pacific Time / 5PM UTC on the [Gatsby Twitch channel](https://www.twitch.tv/gatsbyjs).
26+
27+
<iframe width="560" height="315" src="https://www.youtube.com/embed/NQj3H2Z9vn0?start=229" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
28+
29+
</Announcement>
30+
31+
1932
## What's the difference between `GatsbyImage` and `StaticImage`?
2033

2134
Back in [Part 3](/docs/tutorial/part-3/) of the Tutorial, you learned about how to use the `StaticImage` component from `gatsby-plugin-image`.
@@ -55,6 +68,7 @@ The steps below will help you find and download some photos for your hero images
5568
![A screenshot of the Unsplash home page](./unsplash.png)
5669

5770
2. When you've found a photo that you like, download it and add it to subdirectory for one of your blog posts. Continue downloading photos until you have a different hero image for each post.
71+
![Diagram of the "blog" folder structure, with the hero image for each post in the subdirectory for that post.](./folder-structure-with-images.png)
5872

5973
<Announcement style={{marginBottom: "1.5rem"}}>
6074

@@ -344,8 +358,8 @@ Once you have your GraphQL query set up, you can to add it to your blog post pag
344358
mdx(slug: {eq: $slug}) {
345359
body
346360
frontmatter {
347-
date(formatString: "MMMM DD, YYYY")
348361
title
362+
date(formatString: "MMMM DD, YYYY")
349363
hero_image_alt
350364
hero_image_credit_link
351365
hero_image_credit_text
@@ -456,9 +470,9 @@ const BlogPost = ({ data }) => {
456470
{/* highlight-start */}
457471
<p>
458472
Photo Credit:{" "}
459-
<Link to={data.mdx.frontmatter.hero_image_credit_link}>
473+
<a href={data.mdx.frontmatter.hero_image_credit_link}>
460474
{data.mdx.frontmatter.hero_image_credit_text}
461-
</Link>
475+
</a>
462476
</p>
463477
{/* highlight-end */}
464478
<MDXRenderer>
@@ -485,6 +499,13 @@ Try removing the `{" "}` and see what happens. The paragraph text should end up
485499

486500
![A screenshot of the My First Post blog page, which now includes a photo credit underneath the hero image. It says, "Photo Credit: Christopher Ayme".](./blog-post-with-hero-image-credit.png)
487501

502+
<Announcement style={{marginBottom: "1.5rem"}}>
503+
504+
**Want to see how it all fits together?** Check out the commit history in the [GitHub repo for the finished example site](https://github.com/gatsbyjs/tutorial-example).
505+
506+
</Announcement>
507+
508+
488509
## Summary
489510

490511
Take a moment to think back on what you've learned so far. Challenge yourself to answer the following questions from memory:

0 commit comments

Comments
 (0)