birkir / gatsby-source-prismic-graphql

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

Confusing and incorrect documentation about previews option #194

Open henrikland opened 4 years ago

henrikland commented 4 years ago

In the plugin configuration example you can see the following: previews: true, // optional, default: false

Further down, under Prismic Previews: Previews are enabled by default

As I understand it the latter is the correct one, previews are enabled by default, and the configuration example needs to be updated.

birkir commented 4 years ago

Yeah it's a typo, enabled by default 👍🏻

ohlr commented 4 years ago

@birkir, @henrikland additional things in the docs:

  1. previewPath vs path -- in the first example previewPath is used. Later on path.

path seems to be required although previews (previews: false) are disabled.

The plugin "gatsby-source-prismic-graphql" must set the page path when creating a page.

  1. omitPrismicScript is not explained in the docs. If previews are disabled it's not necessary to load prismic.min.js hence omitPrismicScript should be set to true