Skip to content

Commit 3eb79e3

Browse files
committed
add pathPrefix option
1 parent 51c0291 commit 3eb79e3

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,7 @@ gatsby serve
7777
```
7878

7979
Once this starts, you can view your site at http://localhost:9000.
80+
81+
## Deployment
82+
83+
If you need to serve this blog from other than root, set `pathPrefix: ""` in `gatsby-config.js` and insert the right prefix.

gatsby-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
pathPrefix: "/metafacture-blog",
23
siteMetadata: {
34
title: `Metafacture Blog`,
45
author: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"url": "git+https://github.com/metafacture/metafacture-blog.git"
5252
},
5353
"scripts": {
54-
"build": "gatsby build",
54+
"build": "gatsby build --prefix-paths",
5555
"develop": "gatsby develop -H 0.0.0.0",
5656
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
5757
"start": "npm run develop",

0 commit comments

Comments
 (0)