{"id":13826354,"url":"https://github.com/FrontendMasters/gatsby-intro","last_synced_at":"2025-07-09T00:33:07.631Z","repository":{"id":36685027,"uuid":"184125955","full_name":"FrontendMasters/gatsby-intro","owner":"FrontendMasters","description":"Code for the Introduction to Gatsby course.","archived":false,"fork":false,"pushed_at":"2024-03-01T20:55:42.000Z","size":8951,"stargazers_count":252,"open_issues_count":30,"forks_count":234,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-11T21:08:45.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://frontendmasters.com/courses/gatsby/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FrontendMasters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-29T18:50:53.000Z","updated_at":"2024-11-04T17:48:43.000Z","dependencies_parsed_at":"2023-01-17T04:15:26.956Z","dependency_job_id":null,"html_url":"https://github.com/FrontendMasters/gatsby-intro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fgatsby-intro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fgatsby-intro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fgatsby-intro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrontendMasters%2Fgatsby-intro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrontendMasters","download_url":"https://codeload.github.com/FrontendMasters/gatsby-intro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476384,"owners_count":17480215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T09:01:36.114Z","updated_at":"2024-11-20T05:30:38.487Z","avatar_url":"https://github.com/FrontendMasters.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003e [!NOTE]\n\u003e This repo is from an archived version of the course. Watch the latest version of the course on [frontendmasters.com](https://frontendmasters.com/courses/gatsby-v2/).\n\n\u003c!-- AUTO-GENERATED-CONTENT:START (STARTER) --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.gatsbyjs.org\"\u003e\n    \u003cimg alt=\"Gatsby\" src=\"https://www.gatsbyjs.org/monogram.svg\" width=\"60\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e\n  Frontend Masters: Introduction to Gatsby\n\u003c/h1\u003e\n\nIn this course, learn to build blazing fast apps and websites with React using Gatsby, a static PWA (Progressive Web App) generator. Over 50% of people will abandon a mobile site if it takes more than 3 seconds to load. Unless you’re willing to give up half of your potential customers, performance is no longer optional on the modern web. Fortunately, there are a lot of tools available to help you build screaming fast websites. Unfortunately, there’s a frighteningly large number of performance considerations, and many of them are easy to get wrong.\n\n## What You’ll Learn\n\n- Learn how to leverage free, open source tools including Gatsby, React, and\n  GraphQL to build high-performance websites.\n- Deliver an excellent experience to your users by providing only critical\n  assets on load and prefetching assets for subsequent page loads.\n- Implement performance best practices, such as the PRPL pattern, lazy\n  loading assets, and more.\n- Learn to build and deploy blazing fast websites in the fraction of time.\n- Create websites quickly with performance baked in.\n- Deploy your sites for free in minutes with Netlify.\n\n## A Note About Running the Code\n\nWe recommend getting the [code running on your computer](#getting-course-code-running-on-your-machine) to build your confidence working with Gatsby. If you get stuck, use the [Course Errata](#course-errata) below to debug, or refer to the the step branches to see what is different between your code and the reference code.\n\n## Course Code Running on CodeSandbox\n\nYou can jump into the CodeSandbox for each branch without having to get the code running on your computer. Keep in mind, that if you want to modify the code, you'll need to create a CodeSandbox free account to fork a new sandbox and save it to your CodeSandbox account.\n\n- [Course Starter](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/master/)\n- [Step 0: Pages \u0026 Links](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step0/pages-and-links) \n- [Step 1: Styles](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step1/styles)\n- [Step 2: GraphQL \u0026 SEO](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step2/graphql-and-seo)\n- [Step 3: MDX](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step3/mdx)\n- [Step 4: MDX Blog](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step4/mdx-blog)\n- [Step 5: Hero Image](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step5/hero-image)\n- [Step 6: Blog Images](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step6/blog-images)\n- [Step 7: Source Plugins with Instagram Datasource](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step7/source-plugins)\n- [Step 8: Analyze Bundle](https://codesandbox.io/s/github/FrontendMasters/gatsby-intro/tree/step8/analyze) (must fork to run npm run analyze)\n\n## Getting Course Code Running on Your Machine\n\nFor windows users, go through the installation instructions for [cross-env](https://github.com/kentcdodds/cross-env) and add it to your `package.json` develop script.\n\n1. `npm install`\n1. `npm run develop`\n1. Open http://localhost:8000/\n\n[Course Slides](https://jlengstorf.github.io/presentations/workshop-gatsby-mdx-blog/#/) (hit the right/down arrow keys to progress through the slides)\n\nRefer to the Course Errata below if you are running into issues.\n\n### Prerequisites\n\n1. Have a text editor installed, i.e. [VSCode](https://code.visualstudio.com/)\n2. Have the Gatsby CLI (gatsby-cli) installed globally by running:\n   `npm install -g gatsby-cli`\n   \n## Course Errata\n\n### Video: [Rendering Components in MDX](https://frontendmasters.com/courses/gatsby/rendering-components-in-mdx/) video at 1 minute, 32 seconds where Jason installs the Gatsby MDX plugin.\n\n#### The `gatsby-mdx` plugin was deprecated in favor of `gatsby-plugin-mdx`.\n\nFixed code: See this [commit to migrate to gatsby-plugin-mdx](https://github.com/FrontendMasters/gatsby-intro/commit/fe9aae6255cc1749205f95e8ca6698476f992a61)\n\n`npm install gatsby-plugin-mdx` instead of `gatsby-mdx`\n\nView the `step4/mdx-blog` branch for final code for the section.\n\n### Video: [Adding Optimized Images to Post](https://frontendmasters.com/courses/gatsby/adding-optimized-images-to-posts/) at 1 minute, 49 seconds where Jason configures remark images.\n\n#### An additional config line needs to be added to configure `gatsby-remark-images`.\n\nFixed code: See this [commit to configure `gatsby-remark-images'`](https://github.com/FrontendMasters/gatsby-intro/commit/932de28e17f89888d0826e0b6148a9d9452f95cb)\n\n```javascript\n    {\n      resolve: 'gatsby-plugin-mdx',\n      options: {\n        defaultLayouts: {\n          default: require.resolve('./src/components/layout.js'),\n        },\n        gatsbyRemarkPlugins: ['gatsby-remark-images'],\n        plugins: ['gatsby-remark-images'],\n      },\n    },\n```\n\nView the `step6/blog-images` branch for final code for the section.\n\n### Video: [Getting Post by Slug](https://frontendmasters.com/courses/gatsby/getting-post-data-by-slug/) at 4 minutes, 55 seconds where Jason gets the post body.\n\n#### gatsby-plugin-mdx no longer requires `body` to be nested in `code` in the query\n\nin ```post.js``` the query should be\n\n```javascript\nexport const query = graphql`\n  query($slug: String!) {\n    mdx(frontmatter: { slug: { eq: $slug } }) {\n      frontmatter {\n        title\n        author\n      }\n      body\n    }\n  }\n`\n```\n\nInstead of \n\n```javascript\nexport const query = graphql`\n  query($slug: String!) {\n    mdx(frontmatter: { slug: { eq: $slug } }) {\n      frontmatter {\n        title\n        author\n      }\n      code {\n        body\n      }\n    }\n  }\n```\n\nMore details in [issue #27](https://github.com/FrontendMasters/gatsby-intro/issues/27)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFrontendMasters%2Fgatsby-intro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFrontendMasters%2Fgatsby-intro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFrontendMasters%2Fgatsby-intro/lists"}