Creating My Personal Website With Gatsby and GitHub Pages

Here’s the repo for the website:


The old version of my website

Initial Setup

npm install -g gatsby-cli
gatsby new my-gatsby-website
cd my-gatsby-website 
git remote add origin[user]/[user]
git checkout -b dev
git branch master

Editing the Website

gatsby develop

Publishing Manually

npm install gh-pages --save-dev
"scripts": {
"deploy": "gatsby build --prefix-paths && gh-pages -d public -b master",
npm run deploy 

Adding Continuous Deployment

Workflow runs

Adding Google Analytics (Page Views & Traffic)

npm install — save gatsby-plugin-gtag
path: `.env`,

I code stuff.