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
Service or business name
Brief description of the service
Service category (e.g., “Entrepreneurship & Business”, “Education”, “Healthcare”)
Whether to feature on homepage
Verification status by platform administrators
URL or path to service logo
Main service image
Contact information
Physical location details
Social media links
Array of string tags for categorization
Structured business hours
Current status
Last update timestamp
Events Schema
Event name
Event description
Event start date and time (ISO 8601 format)
Event end date and time for multi-day events
Event venue or location description
Event category (e.g., “Festival”, “Workshop”, “Conference”)
Organizing person or entity
Event status
Highlight on homepage
Event poster or main image
Organizer contact information
Registration details
Event speakers/panelists
Array of string tags
Jobs Schema
Job title
Hiring organization
Job location
Employment type
Job category
Salary information or range
Application deadline (automatically coerced from string)
Date posted (automatically coerced from string)
Job status
Feature on jobs page
Required skills (array of strings)
Application contact information
Full job description (markdown content)
Photos Schema
Photo title or story headline
Photo description or story
Date taken (accepts string, number, or Date - automatically transformed)
Image URL or path (must start with ‘/images/’ or be a valid URL)
Photographer information
Content contributor identifier
Photo tags (array of strings)
Feature in galleries
Photo location
Additional gallery images (array of string URLs/paths)
Stores Schema
Store name
Store description
Store type
Store logo URL/path
Cover/banner image
Owner information
Store location
Menu items (for food establishments)
Services offered (for service-based stores)
Accepted payment methods (array of strings)
Delivery options (array of strings)
Store status
Date joined platform (coerced from string)
Marketplace Schema
Listing title
Item/service description
Listing type
Product/service category
Price amount
Price type
Product images (array of URLs/paths)
Vendor information
Listing status
Item condition (for products)
Posting date (coerced from string)
External purchase link (validated as URL)
Resources Schema
Resource title
Resource description
Resource category
Publication/creation date
Resource author or creator
Thumbnail image
File type (e.g., “pdf”, “doc”, “video”)
File size (e.g., “748.24 KB”)
Direct download URL
Resource page URL
Available languages (array of strings)
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