Add the following (with their respective values) to your .env
file in the root of the codebase.
You could also duplicate .env.example
.
# https://www.algolia.com/
ALGOLIA_ADMIN_KEY=
ALGOLIA_API_KEY=
ALGOLIA_BASE_URL=
ALGOLIA_DISABLED=false
GATSBY_ALGOLIA_APP_ID=
GATSBY_ALGOLIA_SEARCH_KEY=
npm install
npm run develop
If you have issues with the image processor, try
npm run clean && GATSBY_CPU_COUNT=8 npm run develop
A quick look at the top-level files and directories you'll see in a Gatsby project.
❯ tree -L 1
.
├── LICENSE
├── README.md
├── articles <------------ blog post md files
├── build <--------------- generate fields and pages
├── courses <------------- course material md files
├── node_modules <-------- npm dependencies (requires npm install)
├── public <-------------- auto-generated output dir
├── resources <----------- non-deployable assets
├── resume <-------------- resume related md files
├── scribbles <----------- micro blog post md files
├── src <----------------- the meat of of the website
├── .editorconfig
├── .env
├── .gitignore
├── .prettierignore
├── .prettierrc
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-site.js
├── netlify.toml <-------- required by https://www.netlify.com/
├── package-lock.json
├── package.json
├── postcss.config.js <---- required by tailwind
└── tailwind.config.js <--- tailwind config
This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser.
This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the config docs for more detail).
This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
Add a source image to resources/source
and run npm run build:images
to build all the things!
Looking for more guidance about Gatsby? Full documentation for Gatsby lives on the website. Here are some places to start:
-
For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
-
To dive straight into code samples, head to our documentation. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.
Push to main and Netlify will build and deploy automatically.