Skip to content

Commit

Permalink
Update how-gatsby-works-with-github-pages.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews authored Feb 13, 2018
1 parent b69c4a3 commit d5bf76c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/docs/how-gatsby-works-with-github-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ The easiest way to push a gatsby app to github pages is using a package called `

## GitHub repository page

If you want to use a [custom domain](https://help.github.com/articles/using-a-custom-domain-with-github-pages/), don't add the pathPrefix as it will cause navigation issues. The site will be at the root of the domain, rather than in a subdirectory like `http://username.github.io/reponame/`, and you will be redirected to a 404.

Add a `deploy` script to `package.json`

```
Expand Down Expand Up @@ -46,3 +44,7 @@ In this case we dont need to specify `pathPrefix`, but our website needs to be p
```

After running `yarn run deploy` you should see your website at `http://username.github.io`

## Custom domains

If you use a [custom domain](https://help.github.com/articles/using-a-custom-domain-with-github-pages/), don't add a `pathPrefix` as it will break navigation on your site. Path prefixing is only necessary when the site is *not* at the root of the domain like with repository sites.

0 comments on commit d5bf76c

Please sign in to comment.