gatsby-starter
gatsby-starter copied to clipboard
Gatsby Starter for creating portfolio & blog.
Gatsby Starter
Gatsby Starter for creating portfolio & blog.
Key Features
These are the key features of the project:
- Gatsby (GraphQL for queries)
- React (everything in React Hooks)
- TypeScript (in progress...)
- Redux (custom HOF to connect actions & props)
- Material UI (palette, typography & breakpoints configuration)
- Contentful CMS (blog integration)
- Netlify Deployment Support
- React Helmet
- Prettier
- Gatsby-image
- Config files for each environment
Get Started
Make sure that you have Node.js (>=12.13.0) and yarn v.1 or above installed.
Install Gatsby CLI
npm install -g gatsby-cli
Clone repository
git clone https://github.com/chronisp/gatsby-starter.git <YOUR_PROJECT_NAME>
Move to project directory
cd <YOUR_PROJECT_NAME>
Install all dependencies
yarn install
Contentful blog
Setup Contentful settings
yarn setup
Follow the instructions in order to setup CONTENTFUL_SPACE_ID
and CONTENTFUL_ACCESS_TOKEN
. Required settings will be defined in both .env.development
and .env.production
files.
For more info on how to setup Contentful follow this link.
Development mode
Start development server
yarn develop
Your site is now running at http://localhost:8000
.
Production mode
Create a production build
yarn build
Serve the production build locally
yarn serve
Your site is running at http://localhost:9000
.
Linting
Format all JS files
yarn format
For any building or deployment issues, ensure you have setup your environment according to Gatsby guide for Windows or Linux.