Getting Started With Gatsby
Getting Started With Gatsby.
What is Gatsby?
Gatsby is react-based open source framework and fast static websites generator. It allows to create static HTML at build time and gives the browser a complete page.
1. Getting Started on Gatsby:
Install Global CLI:
npm install -g gatsby-cli
Create new Site:
gatsby new my-gatsby-app
Start development server:
2. Gatsby Project Structure
Once you create you Gatsby application you will find this structure of the project: (see images below)
This directory will contain all of the code related to what you will see on the frontend of your site (what you see in the browser), like your site header, or page template. "src" is a convention for "source code".
pages: become pages automatically with paths based on their file name
template: contains templates for programmatically creating pages.
html: need to be modified if you want to insert custom HTML into the or of each page on your site
static: It will not be processed by webpack.
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.
This file is where Gatsby expects to find any usage of Gatsby expects to find any usage of the Gatsby node API's (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
This file is where Gatsby expects to find any usage of the Gatsby server-side rendering API's (if any). These allow customization/extension of default Gatsby settings affecting the browser.
This file is where Gatsby expects to find any usage of the Gatsby browser API's (if any). These allow customization/extension of default Gatsby settings affecting the browser.
Visit psdwizard.com for
more Frontend Development
tutorials and services.