Skip to content

Categories

Organize your media items by using categories to group them by topic. For example, you can create categories like “Theology”, “Christian Living,” and “Children.” Categories can optionally reference an image that represents the category visually.

Users can filter search results by these categories, making it easier to find relevant content. Categories can also be used for generating a gallery of media items on the homepage. Categories show up on the search result items.

Here is an example of a category:

src/content/categories/theology.json
{
"label": "x.category.theology",
"image": "./images/theology.png"
}

A category is a JSON file that describes a category. The category identifier is its filename without the .json suffix.

type: string
example: "x.category.theology"
required: true

The label is the name of the category that shows up on the UI. The label can either be a fixed string or a translation key to support multiple locales.

Type: string
Example: ./images/theology.png
Required: false

An image representing the category (e.g., a thumbnail, icon, or cover photo).

When provided, the CategoriesSection component can display categories with image previews. This creates a more engaging and visually rich browsing experience.