1.0.7 • Published 2 months ago

@webbio/strapi-plugin-preview v1.0.7

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

Strapi plugin preview

Features

  • A plugin that enables a preview button on pages
  • Links to the Front end page.

Installation

To install this plugin, you need to add an NPM dependency to your Strapi application.

# Using Yarn
yarn add @webbio/strapi-plugin-preview

# Or using NPM
npm install @webbio/strapi-plugin-preview

Configuration

Make sure the correct plugin config is used. When using platforms from the pagebuilder plugin, the preview plugin will first look for the domain within the linked platform as a base url, otherwise it will fallback on the settings inside plugins.ts. Make sure the STRAPI_PREVIEW_SECRET exists. The domains config uses the DTAP_ENV variable to determine the environment. If no config is set for the current environment, it will use the same base domain as Strapi.

./config/plugins.ts

module.exports = ({ env }) => ({
	// ...
	preview: {
		enabled: true,
		config: {
			secret: env('STRAPI_PREVIEW_SECRET'),
			path: '/next/api/preview',
			defaultLocale: 'nl',
			domains: { default: { development: 'http://localhost:3000' } }
		}
	}
	// ...
});

Then, you'll need to build your admin panel:

# Using Yarn
yarn build

# Or using NPM
npm run build
1.0.7

2 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.2

6 months ago

1.0.0

6 months ago

0.0.3

10 months ago

1.0.1-beta.1

6 months ago

0.0.5

10 months ago

0.0.4

10 months ago

1.0.3

6 months ago

0.0.2

11 months ago

0.0.1

11 months ago