0.2.0 ā€¢ Published 2 years ago

strapi-plugin-previewable v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.