This repository hosts the Gatsby site for Ian Holden's professional website: https://ianholden.co.uk
-
Install Dependencies
Clone this repository and navigate to the directory where it was cloned to.
Install the NPM modules that are required to run this project.
npm install
-
Start developing
Navigate into your new site’s directory and start it up.
gatsby develop
-
Open the source code and start editing!
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.Open the
ianholden-v5-gatsby
directory in your code editor of choice and editsrc/pages/index.js
. Save your changes and the browser will update in real time!
If you would like to build and host this project on a custom S3 bucket that does not sit at the root of it's domain, you would need to use a pathPrefix
variable in the gatsby-config.js
to specify where our resources can be found when we are ready to build the project. To do this, do the following:
-
Configure path prefix
Change the
pathPrefix
value ingatsby-config.js
to match the URL where your Gatsby site will be hosted. -
Run build command
Run the following in your terminal:
gatsby build --prefix-paths
gatsby build
Once you have run gatsby build
, upload the generated files from your /build/
directory to your chosen hosting solution (S3, GCS, private web host, etc...).