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).
npm i strapi-plugin-website-preview or yarn add strapi-plugin-website-preview
Inorder to achieve the url of the website developing it must be specified in the .env file as FRONT_END_URL. This url need to be the base url of the website.
FRONT_END_URL="YOUR_BASE_URL_HERE"
.env file of your project.webpack.config.js
file into src/admin and paste this content there.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// ./src/admin/webpack.config.js
'use strict';
module.exports = (config, webpack) => {
// Note: we provide webpack above so you should not `require` it
// Perform customizations to webpack config
// Important: return the modified config
config.plugins.push(
new webpack.DefinePlugin({
FRONT_END_URL: JSON.stringify(process.env.FRONT_END_URL),
})
)
return config;
};
npm build or yarn build
This file is added in order to access the FRONT_END_URL in the plugin.
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.