Live Demo: https://gatsby-starter-saas-marketing.netlify.com/
install Gatsby CLI - more info
install the starter locally:
install dependencies:
start the development server:
At the project root, compile your application for deployment:
Clean the cache to fix certain errors - run the clean command before starting the dev server.
At the project root, serve the production build of your site:
This starter uses styled-components. The theme file contains the base styles src/styles/theme.js
and the global styles file contains basic element styles and a style reset src/styles/GlobalStyles.js
.
Form Handling with Gatsby.js V2 and Netlify
In header.js
replacing the existing <HeaderForm>...</HeaderForm>
components with the following should provide a working example once your site is deployed:
<HeaderForm
name="early-access"
method="post"
data-netlify-honeypot="bot-field"
data-netlify="true"
>
<input type="hidden" name="bot-field" />
<input type="hidden" name="form-name" value="early-access" />
<HeaderInput
type="email"
placeholder="Your email"
name="email"
id="email"
required
/>
<HeaderButton>Early access</HeaderButton>
</HeaderForm>