An open API service indexing awesome lists of open source software.

https://github.com/its-devtastic/strapi-plugin-previewable

Preview your website from within Strapi
https://github.com/its-devtastic/strapi-plugin-previewable

Last synced: 4 months ago
JSON representation

Preview your website from within Strapi

Awesome Lists containing this project

README

        


Logo - Strapi Previewable plugin


Strapi v4 - Previewable plugin


Preview your website from within Strapi



GitHub package.json version


Monthly download on NPM

---

A plugin for [Strapi](https://github.com/strapi/strapi) that embeds your site in Strapi.
The use case for this is to allow content editors to easily enter [Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode).

## Supported Strapi version

Currently only Strapi v4 is supported.

## Installation

With `npm`
```bash
npm install strapi-plugin-previewable
```

With `yarn`
```bash
yarn add strapi-plugin-previewable
```

In the `config/plugins.js` file add:

```js
module.exports = {
preview: {
config: {
websiteUrl: ""
},
},
// other plugins
}
```

☝️ If you're using the `strapi::security` middleware with CSP enabled, make sure
to allow your domain as a `frame-src`. Your `config/middlewares.js` should look something like:

```js
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"frame-src": ["https://example.com"],
...
```

## Support

For Strapi documentation, please go to [the official Strapi documentation](https://strapi.io/documentation/).

For questions and issues with this plugin use one of the following channels:

- [GitHub](https://github.com/devtastic-org/strapi-plugin-previewable/issues) (Bug reports, Contributions, Questions and Discussions)
- [E-mail](mailto:[email protected]) - We'll respond as soon as possible

## 📝 License

[MIT License](LICENSE.md)

Made with 💜 in Utrecht by [Devtastic](https://devtastic.co/).