Gatsby: Setting the baseUrl / baseHref

Created on 9 Jan 2018  路  1Comment  路  Source: gatsbyjs/gatsby

Hi,

I'm just starting with Gatsby and first of all I have to say that it looks amazing. I love it. Thank you!

However after publishing the default project to my server, I found out that Gatsby seems to have troubles when running within a subfolder, for example my-domain.com/gatsby. If I upload my project into that folder, the Link component stops working, because it tries to refer to the top-level domain instead of my subfolder.

What I would like to know, is if there is any comfortable way to define the baseUrl, so that we do not need to fix each Link after uploading / moving the site to a different location.

Most helpful comment

Have a look at the docs :)
https://www.gatsbyjs.org/docs/path-prefix/

>All comments

Have a look at the docs :)
https://www.gatsbyjs.org/docs/path-prefix/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andykais picture andykais  路  3Comments

hobochild picture hobochild  路  3Comments

jimfilippou picture jimfilippou  路  3Comments

timbrandin picture timbrandin  路  3Comments

3CordGuy picture 3CordGuy  路  3Comments