personal contact/blog/portfolio site (gatsby/netlify rebuild version)
A rebuild of my professional blog/portfolio site with Gatsby
.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Requires node
with npm
. See Installing Node.js via package manager for installation instructions.
Requires gatsby-cli
to be installed globally. See gatsby-cli for more options and details.
npm i -g gatsby-cli
Some instructions also assume you are using git
. See Getting Started - Installing Git for installation instructions.
Fork the repo with the Fork
button at the top of the repo page.
Clone the forked repo locally and change directory into it.
git clone <forked_github_repo>
cd <forked_github_repo>
npm
or yarn
npm i
gatsby develop
# once complete, open the site at `http://localhost:8000/` in the browser
# open GraphiQL in the browser or with GraphQL Playground at `http://localhost:8000/___graphql`
Typically, you will want to stop the server and rerun this command after each time you change either
gatsby-config
orgatsby-node
or add newyaml
properties to the markdown files. Type control + c to stop the server.
public
directory
gatsby build
public
directory
gatsby serve
Deploy with now
This method is currently failing.
now
globally
npm i -g now
now
now
Deploy with netlify (preferred)
Fork the repo.
Sign up for a new account and or login to Netlify.
Click New site from Git
Select the forked repo.
Grant Netlify access to your Github account.
Once these steps are completed. Netlify will deploy the site and provide you with a URL.
To use Netlify CMS
, change the value of repo
in static/admin/config.yml
to the name of your forked repo.
From your Github account, navigate to Settings > Developer Settings
Choose New OAuth App
Enter a value for Application name
and Homepage URL
Enter https://api.netlify.com/auth/done
as the value for Authorization callback URL
Click the submit button to create
From the Netlify panel, navigate to your site dashboard and to Settings > Access Control > OAuth
Click Install provider
In the modal, choose GitHub
and enter the Client ID
and Client Secret
from the new OAuth app you setup on Github.
Now when you navigate to /admin
from your site, you should be able to access the admin panel by logging in with your Github account.