Static site version of Kobi using React Gatsby, allowing better performance and versatility.
-
Clone this repository to your device.
-
Install dependencies.
Open the folder in your favorite text editor and run the following command.
npm install
-
Start developing.
Run the following command.
gatsby develop *or* npm run develop
-
Open the source code and start editing!
Your site is now running at
http://localhost:8000!Note: We'll also have a second link:
http://localhost:8000/___graphql. This is a tool you we use to query our Wordpress data. Learn more about using this tool in the Gatsby Tutorial.
A quick look at the top-level files and directories you'll see in a Gatsby project.
.
├── node_modules
├── src
├────components
├────pages
├────images
├────styles
├────templates
├── .gitignore
├── .prettierrc
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-ssr.js
├── LICENSE
├── package-lock.json
├── package.json
└── README.md
-
/node_modules: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. -
/src: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template.srcis a convention for “source code”. a./src/pagesis where we save the pages used in our project. This folder is also where the routing is configured. b./src/templatesis where we save the templates used in for our page generation. c./src/componentsis where we save reusable component modules for our project. d./src/stylesis where we save the styling/css used in our project. e./src/imagesis where we save the images used in our project. -
gatsby-config.js: 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). -
gatsby-node.js: We use Gatsby Node to generate static pages based on GraphiQL query results. Look here for further information Gatsby Node APIs.
That'll be all the components that we're using in Kobi-Gatsby.
Looking for more guidance? 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.
We're currently deploying to Netlify.