# @webbio/strapi-plugin-preview

> This is the description of the plugin.

Latest version **1.0.8** (published 2024-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @webbio/strapi-plugin-preview
pnpm add @webbio/strapi-plugin-preview
yarn add @webbio/strapi-plugin-preview
bun add @webbio/strapi-plugin-preview
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2024-06-12 |
| First published | 2023-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.19.1 <=20.x.x |
| Dependencies | 5 |
| Unpacked size | 141.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Webbio B.V. |
| Maintainers | fred-webbio, smdehaas, jaapwebbio, rowanpaul, mikewebbio, hayedewit, tomwebbio, maikelm, joerismits, martijn-webbio |

## Links

- npm: https://www.npmjs.com/package/@webbio/strapi-plugin-preview
- Repository: https://github.com/webbio/strapi-plugin-preview
- npm.io page: https://npm.io/package/@webbio/strapi-plugin-preview

## Dependencies (5)

- [@strapi/icons](https://npm.io/package/@strapi/icons.md) ^1.12.0
- [@strapi/utils](https://npm.io/package/@strapi/utils.md) ^4.15.2
- [@strapi/design-system](https://npm.io/package/@strapi/design-system.md) ^1.12.0
- [@strapi/helper-plugin](https://npm.io/package/@strapi/helper-plugin.md) ^4.15.2
- [@strapi/typescript-utils](https://npm.io/package/@strapi/typescript-utils.md) ^4.15.2

## Recent versions

- 1.0.8 (latest) — 2024-06-12
- 1.0.7 — 2024-03-26
- 1.0.6 — 2023-12-29
- 1.0.5 — 2023-12-22
- 1.0.4 — 2023-12-20
- 1.0.3 — 2023-11-21
- 1.0.2 — 2023-11-17
- 1.0.1-beta.1 — 2023-11-17
- 1.0.0 — 2023-11-15
- 0.0.5 — 2023-08-03
- 0.0.4 — 2023-08-02
- 0.0.3 — 2023-08-02
- 0.0.2 — 2023-06-28
- 0.0.1 — 2023-06-28

## README

# 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.

```sh
# 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`

```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:

```sh
# Using Yarn
yarn build

# Or using NPM
npm run build
```

---
_Source: https://npm.io/package/@webbio/strapi-plugin-preview · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
