Strapi plugin logo for Content Tags

Content Tags

A Strapi plugin that allows you to add custom tags to your content.

thumbnail for Content Tags

Strapi Plugin Content Tags

A Strapi plugin that allows you to add custom tags to your content.

Installation

# 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.

Todo

  • Add an editor to Advanced settings of Content-Type Builder where you can setup the tags.

Install now

npm install strapi-plugin-content-tags

STATS

6 GitHub stars186 weekly downloads

Last updated

375 days ago

Strapi Version

4.9.0 and above

Author

github profile image for Freyb
Freyb

Useful links

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.