astro.config.mjs at the project root.
Overview
The Astro configuration sets up server-side rendering with Cloudflare, internationalization, experimental font optimization, environment variables, and integrations for code highlighting and sitemap generation.Core Configuration
string
default:"server"
Specifies the output mode for the site. Set to
"server" to enable server-side rendering (SSR).Value: "server"function
default:"cloudflare()"
The deployment adapter for SSR. Uses
@astrojs/cloudflare adapter for deploying to Cloudflare Pages/Workers.Value: cloudflare()Import: import cloudflare from '@astrojs/cloudflare'string
required
The public URL of your deployed site. Used for generating canonical URLs and sitemaps.Value:
"https://lewiskori.com"Experimental Features
array
Experimental font optimization feature that automatically loads and optimizes web fonts.
Environment Variables
object
Defines type-safe environment variables with validation and context specifications.
Internationalization (i18n)
object
Configuration for multi-language support across the site.
Vite Configuration
array
Vite plugins for build tooling and development server.Plugins:
tailwindcss()- TailwindCSS Vite plugin for styling
import tailwindcss from '@tailwindcss/vite'Integrations
Expressive Code
expressiveCode
Syntax highlighting integration for code blocks with advanced features.Import:
import expressiveCode from 'astro-expressive-code'Sitemap
sitemap
Automatic XML sitemap generation for SEO with custom priority rules.Import:
import sitemap from '@astrojs/sitemap'Complete Configuration
Related Configuration
- Site Configuration - Site metadata and personal information
- Content Schema - Content collections schema definitions