Skip to content

its-devtastic/strapi-plugin-previewable

Repository files navigation

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 that embeds your site in Strapi. The use case for this is to allow content editors to easily enter Preview Mode.

Supported Strapi version

Currently only Strapi v4 is supported.

Installation

With npm

npm install strapi-plugin-previewable

With yarn

yarn add strapi-plugin-previewable

In the config/plugins.js file add:

module.exports = {
  preview: {
    config: {
      websiteUrl: "<URL TO YOUR WEBSITE>"
    },
  },
  // 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:

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

Support

For Strapi documentation, please go to the official Strapi documentation.

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

  • GitHub (Bug reports, Contributions, Questions and Discussions)
  • E-mail - We'll respond as soon as possible

📝 License

MIT License

Made with 💜 in Utrecht by Devtastic.

About

Preview your website from within Strapi

Resources

License

Stars

Watchers

Forks

Packages

No packages published