How to add categories and category groups
Add categories
Go to the Sanity Studio, click the Category Management
button, and then click the +
button.
Input the category name, and generate the slug, set the description and priority, then click the Publish
button.
After the category is published, you can see the category list in the website like this.
Add category groups
Go to the Sanity Studio, click the Group Management
button, and then click the +
button.
Input the group name, and generate the slug, set the description and priority, then click the Publish
button.
After the group is published, you can see the group list in the website like this.
The category group is supported by default, if you do not want to show the group, you can disable it by setting the SUPPORT_CATEGORY_GROUP
to false
in the src/lib/constants.ts
file.