0.2.0 • Published 6 months ago
@strapi/plugin-content-source-map v0.2.0
Content Source Map
This plugin adds content source map support to a Strapi project. It is compatible with Vercel's visual editing feature.
You can learn more about Vercel's visual editing here.
This plugin requires a Strapi Enterprise Edition License. Contact our sales team if you don't already have one.
Installation
Add the plugin to your project
npm install @strapi/plugin-content-source-map
Configure the plugin in your project
./config/plugins.js
module.exports = () => ({
'content-source-map': {
enabled: true,
config: {
contentTypes: ['api::article.article', 'api::restaurant.restaurant'],
origin: 'strapi.io',
baseHref: 'https://my.strapi-admin.com',
},
},
});
Configuration
Name | Description | Default |
---|---|---|
contentTypes | Array of content type uid to enable content source map for | [] |
origin | Origin defined in the source map and used to display the edit button | strapi.io |
baseHref | Base url of your Strapi admin panel | Generated based on the server.url config |
Usage
This plugin adds content source map support to the following APIs
GET /api/:contentType
: list a content type entriesGET /api/:contentType/:id
Retrieve a content type entry by id
To get the data with source map you will have to add the following query parameter to your API calls:
encodeSourceMaps=true
This will have performance impacts so you should use this only in draft mode or when doing previews.
0.2.0
6 months ago
0.1.0-beta.0
7 months ago
0.1.0-alpha.4
7 months ago
0.1.0-alpha.3
8 months ago
0.1.0-alpha.2
9 months ago
0.1.0-alpha.1
9 months ago
0.1.0-alpha.0
9 months ago