src/content.config.ts.
Understanding Schemas
Each content collection has a schema that defines:- Required fields - Must be present in every entry
- Optional fields - Can be omitted (marked with
.optional()) - Field types - String, number, date, boolean, array, object
- Enums - Specific allowed values
- Validation rules - Format requirements and transformations
Services Schema
string
required
Service or business name
string
required
Brief description of the service
string
required
Service category (e.g., “Entrepreneurship & Business”, “Education”, “Healthcare”)
boolean
Whether to feature on homepage
boolean
Verification status by platform administrators
string
URL or path to service logo
string
Main service image
object
Contact information
object
Physical location details
object
Social media links
array
Array of string tags for categorization
array
Structured business hours
enum
default:"active"
Current status
date
Last update timestamp
Events Schema
string
required
Event name
string
required
Event description
date
required
Event start date and time (ISO 8601 format)
date
Event end date and time for multi-day events
string
required
Event venue or location description
string
required
Event category (e.g., “Festival”, “Workshop”, “Conference”)
string
required
Organizing person or entity
enum
default:"past"
Event status
boolean
Highlight on homepage
string
Event poster or main image
object
Organizer contact information
object
Registration details
array
Event speakers/panelists
array
Array of string tags
Jobs Schema
string
required
Job title
string
required
Hiring organization
string
required
Job location
enum
required
Employment type
enum
required
Job category
string
Salary information or range
date
required
Application deadline (automatically coerced from string)
date
required
Date posted (automatically coerced from string)
enum
default:"open"
Job status
boolean
default:"false"
Feature on jobs page
array
required
Required skills (array of strings)
object
required
Application contact information
string
required
Full job description (markdown content)
Photos Schema
string
required
Photo title or story headline
string
required
Photo description or story
date
required
Date taken (accepts string, number, or Date - automatically transformed)
string
required
Image URL or path (must start with ‘/images/’ or be a valid URL)
object
required
Photographer information
string
Content contributor identifier
array
Photo tags (array of strings)
boolean
Feature in galleries
string
Photo location
array
Additional gallery images (array of string URLs/paths)
Stores Schema
string
required
Store name
string
required
Store description
enum
required
Store type
string
Store logo URL/path
string
Cover/banner image
object
required
Owner information
object
required
Store location
Menu items (for food establishments)
array
Services offered (for service-based stores)
array
Accepted payment methods (array of strings)
array
Delivery options (array of strings)
enum
default:"pending"
Store status
date
required
Date joined platform (coerced from string)
Marketplace Schema
string
required
Listing title
string
required
Item/service description
enum
required
Listing type
string
required
Product/service category
string
Price amount
enum
default:"contact"
Price type
array
Product images (array of URLs/paths)
object
required
Vendor information
enum
default:"pending"
Listing status
enum
Item condition (for products)
date
required
Posting date (coerced from string)
string
External purchase link (validated as URL)
Resources Schema
string
required
Resource title
string
required
Resource description
string
required
Resource category
date
required
Publication/creation date
string
Resource author or creator
string
Thumbnail image
string
File type (e.g., “pdf”, “doc”, “video”)
string
File size (e.g., “748.24 KB”)
string
Direct download URL
string
Resource page URL
array
Available languages (array of strings)
boolean
Feature on resources page
Additional Schemas
Courses Schema
Courses Schema
Key fields: title, author, category (enum), duration, level (beginner/intermediate/advanced), videoUrl, externalLink, status
Profiles Schema
Profiles Schema
Key fields: name, skill, status, location, category, level, chargeType (free/paid), rate, paymentMethods array, shortDescription
Artists Schema
Artists Schema
Key fields: artistName, medium, nationality, bio, artisticJourney, specialties array, achievements array, notableWorks array
Dancers Schema
Dancers Schema
Key fields: type (individual/group), danceStyles array, festivals array, members array (for groups)
Inspirational Stories Schema
Inspirational Stories Schema
Key fields: title, name, age, country, personImage, content, contact object with social media
News Schema
News Schema
Category enum: business-spotlight, announcement, success-story, business-guide, news, educationAdditional fields: businessName, businessOwner, contactInfo
Rights Schema
Rights Schema
Category enum: legislation, analysis, guide, resourceFields: source, related array
Type Transformations
Date Handling
Most date fields usez.date() or z.coerce.date() which:
- Accepts ISO 8601 date strings (e.g.,
2025-10-30T09:00:00Z) - Accepts date-only formats (e.g.,
2023-05-01) - Automatically converts to JavaScript Date objects
Special Validations
Working with Schemas
TypeScript Support
Schemas automatically generate TypeScript types:Validation Errors
Zod will throw detailed errors for invalid data:Next Steps
Collections Overview
Learn about each collection’s purpose
Contribution Guidelines
How to create properly formatted content