Generate DataPlugin verified by Strapi
Plugin verified by Strapi
Generate data for your content-types
Strapi plugin generate-data
This plugin is for generating data for your content-types.
Features
- It supports only
string
with RegExp pattern,email
,richtext
,integer
,decimal
,date
,media(videos, images, audios, files)
,boolean
enumeration
,password
,UID
,relation
,json
fields of your content types. - Ability to publish data if you have draft mode for your type
- Ability of choosing which field should be included in generating data
- It has preview of data in table, which you want to upload
- Ability of flushing data of the content type you want to upload the generated data
- It creates content in draft if the content type has draft & publish option
Installations
To install this plugin, you need to add an NPM dependency to your Strapi application:
1# Using Yarn
2yarn add strapi-plugin-generate-data
3
4# Or using NPM
5npm install strapi-plugin-generate-data
It should be activated by default, but if you don't have it in your admin then enable the plugin manually in config/plugins
1{
2 ...,
3 "generate-data": {
4 enabled: true,
5 },
6}
Possible issues
- If you don't see generated images on ui and see in console error like content security policy for each image url then you need to update middleware strapi::security in config/middlewares like
1...,
2 {
3 name: "strapi::security",
4 config: {
5 contentSecurityPolicy: {
6 useDefaults: true,
7 directives: {
8 "connect-src": ["'self'", "https:"],
9 "img-src": ["'self'", "data:", "blob:", `https://loremflickr.com/`],
10 upgradeInsecureRequests: null,
11 },
12 },
13 },
14 },
15...
- If you have issue with upload data locally try to use 127.0.0.1 instead of localhost
- If you have issue with no Generate data plugin in left panel, try to run strapi build command it will build your app with plugins
Environment
- Strapi version 4.x.x
Future plans
- Custom fields
- Dynamic zones
- Components
Install now
npm install strapi-plugin-generate-data
Create your own plugin
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.