Skip to main content

Overview

The Event model represents community events, workshops, meetings, and gatherings in and around Dzaleka Refugee Camp. Events can be in-person or online, and may include registration requirements and panelist information.

Schema Definition

The Event model is defined using Zod schema validation in src/content.config.ts:97-132.

TypeScript Type

Fields

Core Fields

string
required
The name of the event.
string
required
A detailed description of what the event is about, its purpose, and what attendees can expect.
Date
required
The start date and time of the event in ISO 8601 format.
Date
The end date and time of the event (for multi-day events).
string
required
The location where the event takes place (e.g., “Online”, “Dzaleka Community Center”, “Zoom Meeting”).
string
required
The type or category of event (e.g., “Zoom Meeting”, “Workshop”, “Conference”, “Community Gathering”).
string
required
The name of the individual or organization hosting the event (e.g., “Inua Advocacy”).
enum
required
Current status of the event. Options: 'upcoming' | 'past'. Defaults to 'past'.
Whether this event should be featured prominently on the platform.
string
Path or URL to a promotional image for the event.
string[]
Array of tags for categorization and searchability (e.g., [“Refugees”, “Malawi”, “Laws”]).

Contact Information

object

Registration Information

object

Panelists

array
Array of speakers, panelists, or presenters for the event.

Example

Here’s a complete example of an Event object for a community discussion:

Usage in Content

Events are stored as Markdown files in src/content/events/ with YAML frontmatter:

Validation Rules

  • title, description, date, location, category, and organizer are required fields
  • status must be either 'upcoming' or 'past' (defaults to 'past')
  • date and endDate must be valid Date objects or ISO 8601 strings
  • If registration.required is true, it’s recommended to provide a registration.url
  • Panelist names are required if the panelists array is provided

Status Management

The status field helps distinguish between:
  • upcoming: Events that haven’t occurred yet
  • past: Events that have already taken place
This allows the platform to filter and display events appropriately in calendars and event listings.