Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Ishaq74/concordia/llms.txt

Use this file to discover all available pages before exploring further.

Concordia uses Astro with server-side rendering (SSR) and supports multiple deployment targets and internationalization.

Astro Configuration

The main configuration is located in astro.config.mjs at the root of the project.

Basic Configuration

astro.config.mjs
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';
import vercel from '@astrojs/vercel';
import Icon from 'astro-icon';
import mdx from '@astrojs/mdx';

export default defineConfig({
  integrations: [Icon(), mdx()],
  output: 'server',
  adapter: vercel(),
  // ... other options
});

Deployment Adapters

Concordia supports two deployment adapters that can be selected at build time.

Vercel Adapter

The default adapter optimized for Vercel deployment:
astro.config.mjs
import vercel from '@astrojs/vercel';

export default defineConfig({
  adapter: vercel(),
  // ...
});
Build Commands:
pnpm run build
Features:
  • Automatic edge function deployment
  • Built-in image optimization
  • Zero-configuration serverless functions
  • Automatic HTTPS
The Vercel adapter is used by default when running npm run build.

Internationalization (i18n)

Concordia supports 4 languages with automatic routing and locale detection.

Supported Locales

astro.config.mjs
export default defineConfig({
  i18n: {
    locales: ['fr', 'en', 'ar', 'es'],
    defaultLocale: 'fr',
    routing: {
      prefixDefaultLocale: true
    }
  },
  redirects: {
    '/': '/fr/'
  }
});
locales
array
required
Supported locales: French (fr), English (en), Arabic (ar), Spanish (es)
defaultLocale
string
default:"fr"
Default language for the application. Set to French (fr).
routing.prefixDefaultLocale
boolean
default:"true"
When true, all routes include the locale prefix (e.g., /fr/about). This ensures consistent URL structure across all languages.

Locale Routing

LocaleCodeExample URLDirection
Frenchfr/fr/aboutLTR
Englishen/en/aboutLTR
Arabicar/ar/aboutRTL
Spanishes/es/aboutLTR
Arabic is automatically detected as RTL (Right-to-Left) and applies the correct dir attribute.

Root Redirect

The root path / automatically redirects to the default locale:
redirects: {
  '/': '/fr/'
}

Output Mode

Concordia uses server-side rendering (SSR) for dynamic content:
astro.config.mjs
export default defineConfig({
  output: 'server',
  // ...
});
output
string
default:"server"
  • server - Enables SSR for all pages
  • hybrid - SSR with selective static generation (not used)
  • static - Pre-renders all pages (not suitable for Concordia)
Changing from server to static will break authentication and dynamic features.

Site Configuration

astro.config.mjs
const siteUrl = process.env.SITE || undefined;

export default defineConfig({
  site: siteUrl,
  base: '/',
  // ...
});
site
string
required
The production URL of your site. Set via the SITE environment variable.Example: https://concordia.example.com
base
string
default:"/"
The base path for your application. Leave as / for root deployment.

Integrations

Concordia includes several Astro integrations:
astro.config.mjs
import Icon from 'astro-icon';
import mdx from '@astrojs/mdx';
import Sonda from 'sonda/astro';

export default defineConfig({
  integrations: [
    Icon(),
    Sonda({ server: true }),
    mdx()
  ],
  // ...
});
Provides icon component support using Iconify collections:
  • @iconify-json/mdi - Material Design Icons
  • @iconify-json/circle-flags - Country flags
  • @iconify-json/openmoji - Emoji icons
Usage:
<Icon name="mdi:account" />
Performance monitoring and analytics integration:
Sonda({ server: true })
Tracks server-side performance metrics.
Enables MDX support for content pages with embedded JSX:
import { Card } from '@components/Card.astro';

# My Article

<Card title="Example" />

Development Settings

Dev Toolbar

astro.config.mjs
export default defineConfig({
  devToolbar: {
    enabled: true
  },
  // ...
});
Enables the Astro development toolbar with debugging tools.

Source Maps

astro.config.mjs
export default defineConfig({
  vite: {
    build: {
      sourcemap: true
    }
  },
  // ...
});
Generates source maps for easier debugging in production.

Experimental Features

astro.config.mjs
export default defineConfig({
  experimental: {
    failOnPrerenderConflict: true
  },
  // ...
});
experimental.failOnPrerenderConflict
boolean
default:"true"
Fails the build if there are prerender conflicts, helping catch routing issues early.

Environment-Specific Configuration

You can customize configuration based on the environment:
astro.config.mjs
const isDev = process.env.NODE_ENV === 'development';
const isProd = process.env.NODE_ENV === 'production';

export default defineConfig({
  // Development-only settings
  devToolbar: {
    enabled: isDev
  },
  
  // Production optimizations
  vite: {
    build: {
      sourcemap: isDev,
      minify: isProd
    }
  },
  // ...
});

Complete Configuration Example

Here’s the full astro.config.mjs used in Concordia:
astro.config.mjs
// @ts-check
import { defineConfig } from 'astro/config';

import node from '@astrojs/node';
import vercel from '@astrojs/vercel';

import Sonda from 'sonda/astro';
import Icon from 'astro-icon';
import mdx from '@astrojs/mdx';

let adapter = vercel();
if (process.argv && process.argv.includes('--node')) {
  adapter = node({ mode: 'standalone' });
}

const siteUrl = process.env.SITE || undefined;

export default defineConfig({
  integrations: [Icon(), Sonda({server: true}), mdx()],
  output: 'server',
  site: siteUrl,
  base: '/',
  adapter,
  redirects: {
    '/': '/fr/'
  },
  i18n: {
    locales: ['fr', 'en', 'ar', 'es'],
    defaultLocale: 'fr',
    routing: {
      prefixDefaultLocale: true
    }
  },
  experimental: {
    failOnPrerenderConflict: true
  },
  devToolbar: {
    enabled: true
  },
  vite: {
    build: {
      sourcemap: true
    }
  }
});

Next Steps

Environment Variables

Configure all required environment variables

Hosting Guide

Deploy to production

Build docs developers (and LLMs) love