Skip to content

Commit

Permalink
add pathPrefix option
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Mar 23, 2023
1 parent 51c0291 commit 3eb79e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -77,3 +77,7 @@ gatsby serve
```

Once this starts, you can view your site at http://localhost:9000.

## Deployment

If you need to serve this blog from other than root, set `pathPrefix: ""` in `gatsby-config.js` and insert the right prefix.
1 change: 1 addition & 0 deletions gatsby-config.js
@@ -1,4 +1,5 @@
module.exports = {
pathPrefix: "/metafacture-blog",
siteMetadata: {
title: `Metafacture Blog`,
author: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -51,7 +51,7 @@
"url": "git+https://github.com/metafacture/metafacture-blog.git"
},
"scripts": {
"build": "gatsby build",
"build": "gatsby build --prefix-paths",
"develop": "gatsby develop -H 0.0.0.0",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
Expand Down

0 comments on commit 3eb79e3

Please sign in to comment.