Gatsby: linkPrefix weirdness

Created on 17 Feb 2017  ·  3Comments  ·  Source: gatsbyjs/gatsby

Deployed to gh-pages no problem. Project name was hackiot so I set the config linkPrefix = "/hackiot". No problems.

Then added a custom CNAME and changed config to linkPrefix = "/". Now my routes do not include the TLD leaving all links broken (ex: http://about).

Went back and changed config to include the TLD linkPrefix = "beta.hackiot.org/". That changed the routes to now include the TLD plus more (ex: http://beta.hackiot.org/beta.hackiot.org/about).

What am I missing here?

Most helpful comment

Removing from config throws an error when building. But it got me thinking... removed --prefix-links flag from the deploy script and all is well now.

Thanks for your input.

All 3 comments

What happens if you remove linkPrefix altogether from the config?

Removing from config throws an error when building. But it got me thinking... removed --prefix-links flag from the deploy script and all is well now.

Thanks for your input.

I have the same problem.
follow @benstr 's solution.
It works. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimfilippou picture jimfilippou  ·  3Comments

dustinhorton picture dustinhorton  ·  3Comments

andykais picture andykais  ·  3Comments

magicly picture magicly  ·  3Comments

theduke picture theduke  ·  3Comments