-
Notifications
You must be signed in to change notification settings - Fork 355
Add preview mode #18
Comments
Even if we implement the preview feature in UI, can we extend the admin and add there a preview button somewhere without modifying the base module of @strapi/strapi? |
Yes, there are already numerous Strapi plugins that do that, this one seems closest: |
That is a great idea. Will add it to the list. |
@pepijn-vanvlaanderen were you successfull adding the preview buttom to this demo? i'm the getting some erorrs at my end.
|
@rrubio it is actually very straightforward when you follow the guide here: https://nextjs.org/docs/app/building-your-application/configuring/draft-mode You just need a custom /api/preview/route.ts where the draftMode gets enabled, after that cookie is set al your pages are dynamically rendered and you have your preview. |
I am going to keep this issue open for anyone wanting to add this as a PR. In terms of items on my list, this has lower priority.😅 |
Would be interesting to have a preview/draft mode included in this starter as well.
The text was updated successfully, but these errors were encountered: