Intermediate Gatsby

certificate
Recording and certification are available to Multipass and Full ticket holders only
Please login if you have one.
Rate this content
Bookmark

With Gats v3 out and freshly released, learn how to build modern, performant and accessible default websites from one of the maintainers of the project, Sid Chatterjee.

This workshop has been presented at React Summit Remote Edition 2021, check out the latest edition of this React Conference.

FAQ

Gatsby is a React-based framework for building static sites. It offers features like GraphQL for data fetching, server-side rendering at build time, and a rich ecosystem of plugins and themes to enhance site functionality.

To create a new Gatsby site using a starter, you need to install Gatsby globally using npm or yarn. Then, run the command 'gatsby new [site-name] [starter-url]', where '[site-name]' is the name of your site and '[starter-url]' is the URL of the starter you want to use.

The File System Route API in Gatsby allows you to create pages programmatically from data. You can define dynamic routes using file names and inject data from GraphQL queries into those pages. This helps in creating pages for each item in a collection, like blog posts or products.

To integrate a CMS with Gatsby, you need to install the appropriate Gatsby source plugin for your CMS. After installing the plugin, configure it in your gatsby-config.js file with the necessary options like API keys or tokens. This enables Gatsby to fetch data from the CMS using GraphQL.

Gatsby Plugin Image is a plugin that helps you optimize and handle responsive images in your Gatsby site. It supports features like lazy loading, multiple image formats, and placeholders, improving performance and user experience by serving the right image size for different devices.

To use CSS frameworks like Tailwind or Emotion in Gatsby, you need to install the respective Gatsby plugin (e.g., gatsby-plugin-tailwindcss or gatsby-plugin-emotion). Then, configure the plugin in your gatsby-config.js file. This setup allows you to use the CSS framework's features in your Gatsby site.

Gatsby themes are like plugins that encapsulate a part of your site's functionality, such as a blog. Unlike starters, which you use to initialize a project, themes can be updated and maintained separately. Themes allow you to compose different parts of your site from reusable packages.

Gatsby Cloud is a cloud platform specifically designed for Gatsby sites. It offers fast builds, incremental builds, and worldwide CDN deployment. Gatsby Cloud integrates seamlessly with various CMSs and provides features like real-time previews, making it a robust solution for deploying and hosting Gatsby sites.

Yes, you can use TypeScript in Gatsby. Gatsby supports TypeScript out of the box for most of your site files. However, for files like gatsby-node.js and gatsby-config.js, you will still need to use JavaScript.

Client-side routing and dynamic pages in Gatsby can be handled using React components and the reach-router library, which Gatsby uses internally. For dynamic pages that aren't pre-rendered at build time, you can use client-only routes. Additionally, plugins like gatsby-plugin-netlify help set up redirects and headers for these routes.

Sid Chatterjee
Sid Chatterjee
207 min
16 Jun, 2021

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The Workshop covered various topics in Gatsby, including getting started, creating pages, using GraphQL, adding markdown plugins, integrating CMSs, exploring Gatsby Plugin Image, preserving state and styling, creating client-side pages, and deploying with Gatsby Cloud. The participants encountered and resolved issues related to file name mapping, rendering HTML, querying markdown content, and troubleshooting CMS integration. TypeScript integration, Gatsby starters and themes, and debugging with verbose logging were also discussed. Gatsby Cloud was highlighted as a preferred hosting solution for fast builds and deployments.
Available in Español: Masterclass Intermedio Gatsby
Video transcription and chapters available for users with access.

Watch more workshops on topic

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Gatsby v4's New Rendering Modes
React Advanced 2021React Advanced 2021
24 min
Gatsby v4's New Rendering Modes
Gatsby V4 introduces deferred static generation (DSG), combining the benefits of static site generation (SSG) and server-side rendering (SSR). This approach allows for faster builds and a more deterministic cache. Gatsby V4 also includes features such as parallel query running and LMDB for enhanced performance. The focus is on integrations and improving the developer experience (DX) in the future.
Theming Gatsby Apps with Theme UI
React Summit 2020React Summit 2020
6 min
Theming Gatsby Apps with Theme UI
Welcome to Theming Gatsby apps with Theme UI. Gatsby is a React-based framework for building static websites and applications. Theme UI is a styling library that allows developers to configure designs for components using predefined values. In Theme UI, you can easily refer to your theme object throughout your project. Variants allow you to define styles for common components like buttons.