Gatsby was named the #1 new technology to learn in 2020!
To help you learn about Gatsby and our ecosystem, we invite you to take the #100DaysOfGatsby challenge! If you are new to Gatsby, you can follow along with our beginner-friendly weekly prompts. Or if you are familiar with Gatsby and want to go deeper, we invite you to build your first Gatsby Theme.
Learn more about #100DaysOfGatsby here!
Challenge 12: Add Gated Content to Your Website
Did you know Gatsby can be used for websites as well as dynamic apps? Dustin Schau presented about this topic at Gatsby Days London:
For example, if your project needs private routes, or sections of the site that only authenticated users can view, Gatsby can enable that with just a plugin, or by creating a few components from scratch. In the following resources we invite you to try both paths, and experiment with powerful third-party authentication services.
Gatsby for Apps Resources
Overview & Examples
First, get familiar with how Gatsby works for apps.
Then watch this helpful livestream that covers adding an authentication service called Auth0 to your site.
Lastly, play with live examples of these features by signing in to the Gatsby Swag Store, and Gatsby Cloud
The Plugin Path
To get started quickly, use gatsby-plugin-create-client-paths
to create private client routes in your Gatsby site. Learn more.
The Hand-Rolled Path
Read this tutorial and handy illustration that walks you through adding private routes and authentication in Gatsby.
What to Do If You Need Help
If you get stuck during the challenge, you can ask for help from the Gatsby community and the ASKGatsbyJS Twitter account. You can find fellow Gatsby Developers on Discord, Reddit, and Dev.