A Strapi plugin that allows you to add custom tags to your content.
A Strapi plugin that allows you to add custom tags to your content.
# using yarn
yarn add strapi-plugin-content-tags
# using npm
npm install strapi-plugin-content-tags --save
To allow tags on a collection type, edit \
./src/api/[content-type-name]/content-types/[content-type-name]/schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"pluginOptions": {
"i18n": { ... },
"content-tags": {
"fieldName": "Tags",
"tags": {
"None": { "color": "neutral" },
"Done": { "color": "success" },
"In progress": { "color": "primary" },
"Error": { "color": "danger" }
},
"defaultTag": "None"
}
},
...
"attributes": {
...
"Tags": {
"type": "customField",
"customField": "plugin::content-tags.content-tags"
}
...
}
}
The pluginOption
section lets you configure the the tags of the collection type.
fieldName
is a reference to the field you have specified in the attributes
section.tags
is an objects of which the keys are the labels of the tags and the values need to contain the following properties: color
: The display color of the badge. It is passed to a Status component. \
Possible values: alternative, danger, neutral, primary, secondary, success, warning.defaultTag
: A key in tags
that will be assigned to entities by default.In the attributes
section you need to define a field, using the provided custom component. You can do that by either editing schema.json
manually or adding it through Content-Type Builder.
npm install strapi-plugin-content-tags
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.