birkir / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
137 stars 75 forks source link

Is there a way of Generating/Using a custom index page? #247

Closed jodiedoubleday closed 3 years ago

jodiedoubleday commented 3 years ago

I have 1 custom type in Prismic I want to use for all page types.

If I set the UID in Prismic to be index, localhost:9000/index works fine but localhost:9000/ (I actually get a flash of the page I want, then a white screen).

I've tried

{
  type: 'Page',
  match: '/',
  previewPath: '/:uid/',
  filter: data => data.node._meta.uid.includes('index'),
  component: require.resolve('./src/templates/page.jsx'),
}

which doesn't work. Has anyone got any suggestions on how to get this?