Differences between SINGLE TYPES and COMPONENTS
Strapi single types allow us to have one entry per single type. They are useful when we do not want to have multiple entries. We want to have an API name, a description, a version, and a list of developers as metadata information stored in a single type and have it publicly accessible via an endpoint. To do so, we will create a single type. Proceed as follows:
- In the Strapi admin panel, navigate to the Content-Type Builder plugin page.
- Click Create new single type under the SINGLE TYPE category.
- We will call this collection Info.
- Create Short Text fields for the name and version fields.
- Create a Long Text field for the description field.
The process is illustrated in the following screenshot:
Let's save the info Single type and add some content to it.
- Click Save to save the Single type.
- Wait for the server to restart. Once the...