fabe/gatsby-universal

Remove pathPrefix from site-config.js

smatysik opened this issue · 0 comments

Hello! Thanks for the awesome Gatsby starter. I wanted to flag an issue that I came across while using it:

In site-config.js, there is an entry for pathPrefix:

module.exports = {
  siteTitle: `Gatsby Universal`,
  siteTitleShort: `GatsbyU`,
  siteDescription: `An opinionated starter for Gatsby.`,
  siteUrl: `https://gu.fabianschultz.com`,
  themeColor: `#000`,
  backgroundColor: `#fff`,
  pathPrefix: null,
  logo: path.resolve(__dirname, 'src/images/icon.png'),
  social: {
    twitter: `gatsbyjs`,
    fbAppId: `966242223397117`,
  },
};

I tried to use this key to influence the Gatsby build as detailed here: https://www.gatsbyjs.org/docs/path-prefix/, which does not work as site-config.js is loaded under the siteMetadata key within gatsby-config. Instead, pathPrefix needs to be set at the top level of the gatsby-config.js module.

Is there a use case for storing pathPrefix on siteMetadata? If not, I would suggest removing it as it can be confusing to beginners.

Thanks!