Without actually visiting the website, you can see a live preview of the web page by using this plugin.
The plugin can be used in strapi version above 4.4 (versions that support custom fields).
Go into your strapi project.
Run the npm command npm i strapi-plugin-website-preview or yarn add strapi-plugin-website-preview
The plugin will be added to your strapi project.
Inorder to achieve the url of the website developing it must be specified in the .env file as STRAPI_ADMIN_FRONT_END_URL. This url need to be the base url of the website.
Add this to the STRAPI_ADMIN_FRONT_END_URL="YOUR_BASE_URL_HERE"
.env file of your project.
Run the command npm build or yarn build
Create a new field form a content type.
Select custom fields.
Page Preview field will appear there.
Select this field and name it accordingly ("page_preview" is used commonly for more understanding) and save.
Select the content type from the content manager.
Add end point of the page in the page_preview field and save.
Click on the preview button then the page will be pop up.
To Add an external url you will need to alter the middleware.js file as follows.
Add this code into config/middlewares.js
1module.exports = [
2 'strapi::errors',
3 {
4 name: "strapi::security",
5 config: {
6 contentSecurityPolicy: {
7 useDefaults: true,
8 directives: {
9 'frame-src':["'self'","https://www.wikipedia.org/"],
10 'frame-ancestors': null,
11 upgradeInsecureRequests: null,
12 },
13 },
14 frameguard: false,
15 },
16 },
17 'strapi::cors',
18 'strapi::poweredBy',
19 'strapi::logger',
20 'strapi::query',
21 'strapi::body',
22 'strapi::session',
23 'strapi::favicon',
24 'strapi::public',
25];
npm install strapi-plugin-website-preview
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.