prismic-archive / express-prismic

Prismic.io support for NodeJS
Apache License 2.0
4 stars 3 forks source link

Does Preview work? #6

Open ericclemmons opened 8 years ago

ericclemmons commented 8 years ago

Hi!

  1. I followed the quickstart.
  2. Successfully completed it (it worked!)
  3. I edited the page in the Admin and saved it.
  4. Setup a preview URL http://localhost:3000/preview.
  5. Previewed the document, which does nothing more than redirect to / showing the original, published content.
  6. Clicking the Prismic badge in the bottom-right, a panel slides out showing the updated, saved content for previewing.
  7. Clicking that document sends me back to step 5.

What's confusing is that the docs make it seem much more complicated:

https://prismic.io/docs/in-website-preview#?lang=node

Doesn't app.route('/preview').get(prismic.preview); negate the need for most of the code?

Or should p.getByUID('page', 'get-started', function (err, pagecontent) { do something different?

Thanks!

erwan commented 8 years ago

Hi,

There has been a bug fix recently in the Javascript kit for previews. Try updating to 2.1.3 (I'll update the package.json in this project).

erwan commented 8 years ago

I've released a new version of this lib, could you try it?