# Hiking - Gatsby

# Project summary

Recording my hiking adventures in Singapore using Gatsby.

# 🌐 Page

🌐 hiking
https://aliciacyy.github.io/hiking/

# Github repository

🚀 hiking
https://github.com/aliciacyy/hiking

# Setup guide

The setup and deploy guide is up to date with version 2.25.3

  1. Install Gatsby:
npm install -g gatsby-cli
  1. Initialization:
gatsby new <name> https://github.com/gatsbyjs/gatsby-starter-blog
  1. Run Gatsby:
gatsby develop

# Deploy to Github Pages

# Prerequisites

  1. Install Github Pages package
npm install gh-pages --save-dev
  1. Add pathPrefix to your gatsby-config.js.
./gatsby-config.js.
module.exports = {
  pathPrefix: `/<repo>`,
}
  1. Add deploy to package.json.
./package.json
{
  "scripts": {
    "deploy": "gatsby build --prefix-paths && gh-pages -d public"
  }
}
  1. Go to Github Pages at https://github.com/<github_user>/<repo>/settings/pages.
  2. Select gh-pages branch with /(root) and save.

# Deployment

Run the following:

npm run deploy

# Official guides