This is a fork of https://github.com/gatsbyjs/gatsby-starter-default which shows how to use Netlify Identity and Netlify Functions with Gatsby. Start here for your next JAMstack hackathon or use this as a reference implementation.
You may not need this starter repo! Learn how to add Netlify Identity and Functions to your own existing Gatsby project.
Check our post on the Gatsby blog: Turning the Static Dynamic: Gatsby + Netlify Functions + Netlify Identity
You can clone and deploy this sample project with one click:
Basically these are the extra dependencies it adds:
netlify-lambda
: For locally emulating Netlify Functionshttp-proxy-middleware
: For proxying netlify-lambda function calls to avoid CORS issues as per the Gatsby docsnetlify-identity-widget
: For adding
If you are not using the Deploy to Netlify button (which has the &stack=cms
parameter that automatically sets it up for you), you will have to enable Netlify Identity manually yourself. Just head to https://app.netlify.com/sites/YOUR_SITE_HERE/identity
and enable it, so that your netlify-identity-widget
works.
- please see the src README for explanation on the layout
- please see the app README for explanation on the app
Other useful resources/reference projects that may help you:
- https://github.com/netlify/create-react-app-lambda
- https://github.com/netlify/netlify-identity-widget/tree/master/example
Please contact @swyx if you need more help with Netlify.