-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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: