birkir / gatsby-source-prismic-graphql

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

How to disable the preview path as gatsby image fail on netlify build #211

Open wooxudong opened 4 years ago

wooxudong commented 4 years ago

What I would like to achieve is that /preview and related page would not be created on build. I have this set up in my gatsby-config.js

        previews: false,
        omitPrismicScript: true,
        pages: [
          {
            type: 'Blogpost', // TypeName from prismic
            match: '/blog/:uid', // pages will be generated under this pattern
            component: require.resolve('./src/templates/blogTemplate.js'),
          },
        ],
        sharpKeys: [/image|photo|picture/, 'thumbnail'],

and this still create the /preview page

/preview/blogpost
/blog/test-blog
/preview
/blog/
/contact/
/
/intro/
/work/
tahmid-shahriar commented 4 years ago

I have the same problem, it's creating a preview route and I can't seem to disable it.

tahmid-shahriar commented 4 years ago

@arnaudlewis please take a look at this, a blank route can impact SEO i guess?

ohlr commented 4 years ago

The issue is present in 3.6.3-alpha.12. Sitemap generation with gatsby-plugin-sitemap also reveals the pages to google... Not cool