Skip to main content
This guide covers the main configuration files and options for Dzaleka Online Services.

Astro Configuration

The project uses Astro as its framework. Configuration is in astro.config.mjs.

Basic Settings

astro.config.mjs

Configuration Options

site

Type: string
Value: https://services.dzaleka.com
The production URL of your site. Used for generating canonical URLs and sitemaps.

output

Type: 'static' | 'server' | 'hybrid'
Value: static
Defines the build output mode:
  • static: Pre-renders all pages at build time (current setting)
  • server: Renders pages on-demand
  • hybrid: Mix of static and server-rendered pages

adapter

Type: AstroAdapter
Value: Dynamic (Netlify or Node.js)
The adapter used depends on the environment:
  • Netlify: Automatically selected when NETLIFY env var is present
  • Node.js: Used for local development and self-hosted deployments

Integrations

The project uses several Astro integrations defined in astro.config.mjs:20-24:

@astrojs/tailwind

Enables Tailwind CSS support. Configuration in tailwind.config.cjs.

@astrojs/mdx

Enables MDX support for enhanced markdown with JSX components.

@astrojs/react

Enables React component support in Astro pages.

Markdown Configuration

Markdown processing is configured in astro.config.mjs:25-32:
Remark Plugins:
  • remarkSlug: Adds IDs to headings for anchor links
  • remarkToc: Generates table of contents with compact spacing
Shiki Configuration:
  • theme: dracula - Syntax highlighting theme
  • wrap: true - Wraps long code lines

Tailwind CSS Configuration

Tailwind is configured in tailwind.config.cjs with custom theme extensions.

Content Sources

tailwind.config.cjs
This tells Tailwind where to look for class names to include in the final CSS.

Custom Colors

The project defines custom color palettes reflecting Dzaleka’s cultural identity:
See the full color palette in tailwind.config.cjs:13-80.

Typography

Custom font families are defined in tailwind.config.cjs:81-84:
Usage:

Custom Animations

Several custom animations are available in tailwind.config.cjs:85-108:
Usage:

Safelist

Dynamic classes that should always be included in tailwind.config.cjs:4-10:
Safelisted classes are always included in the CSS output, even if not found during content scanning. Use sparingly to keep bundle size small.

Plugins

Tailwind plugins are configured in tailwind.config.cjs:111-115:
  • @tailwindcss/typography: Prose styles for markdown content
  • @tailwindcss/forms: Better form element defaults
  • @tailwindcss/aspect-ratio: Aspect ratio utilities

Content Collections

Content collections organize structured content like events, stories, and jobs.

Available Collections

Based on the project structure, these collections are available:
  • events: Community events and activities
  • stories: Community narratives and histories
  • inspirational-stories: Personal success stories
  • jobs: Job opportunities
  • marketplace: Products and services for sale
  • services: Community services and organizations
  • stores: Local businesses
  • sites: Community locations and facilities
  • docs: Documentation pages
  • talents: Community talent profiles

Collection Schema Example

Content collections use frontmatter for metadata. Example from an event:

Adding New Content

TypeScript Configuration

The project uses TypeScript for type safety. Dependencies include:
  • @types/node: Node.js type definitions
  • @types/react: React type definitions
  • @types/react-dom: React DOM type definitions
  • @types/leaflet: Leaflet map library types
  • @types/nodemailer: Nodemailer email library types

Next Steps

Environment Variables

Configure environment-specific settings

Netlify Deployment

Deploy your configured site to Netlify