Configuration
Reference Dahlia theme configuration fields, defaults, and related docs.
This reference lists top-level Dahlia theme fields. Use the linked configuration pages for examples and behavior details.
Config Files
Dahlia automatically reads theme.config.json from the Astro project root. Use
JSON when your theme configuration is plain data and you want editor completion
from the schema.
{ "$schema": "https://astro-theme-dahlia.prosefly.dev/schema.json", "name": "My Docs", "description": "Documentation for my project.", "appearance": { "accent": "emerald" }}Register Dahlia without arguments when all configuration lives in JSON:
import { defineConfig } from 'astro/config';import dahlia from '@prosefly/astro-theme-dahlia';
export default defineConfig({ integrations: [dahlia()],});Values passed to dahlia({...}) override theme.config.json. Object options
such as appearance, footer, iconify, locales, markdown, source, and
ui are shallow-merged; arrays such as siteNav, socials, and docsNav
replace the JSON value when provided.
Component overrides are integration-only. Configure components in
astro.config.ts, not in theme.config.json.
Options
| Field | Default | See |
|---|---|---|
name | 'Documentation' | Project |
description | 'Project documentation.' | Project |
logo | built-in Dahlia mark | Project |
favicon | none | Project |
appearance | accent: 'indigo', gray: 'neutral', defaultMode: 'system', radius: 'medium' | Appearance |
docsBase | '/' | Content Routing |
defaultLocale | first configured locale | Internationalization |
locales | none | Internationalization |
ui | built-in English messages | Internationalization |
siteNav | one Docs link | Navbar |
socials | [] | Navbar |
docsNav | [] | Docs Navigation |
footer | empty copyright and sections | Footer |
search | { provider: 'local' } | Search |
assistant | false | Assistant |
llms | true | Content Routing |
pageActions | copy, Markdown, ChatGPT, Claude | Page Actions |
source | inferred when possible | Source |
editLink | hidden | Source |
contributors | false | Source |
components | {} in dahlia({...}) only | Overriding Components |
credits | true | Footer |
iconify | default Iconify API, scan enabled | Integrations |
markdown | all transforms enabled, Expressive Code defaults | Integrations |
TypeScript Options
Use defineDahliaConfig() inside astro.config.ts when configuration needs
TypeScript, imports, or computed values:
import { defineConfig } from 'astro/config';import dahlia, { defineDahliaConfig } from '@prosefly/astro-theme-dahlia';
const dahliaConfig = defineDahliaConfig({ name: 'My Docs', description: 'Documentation for my project.',});
export default defineConfig({ integrations: [dahlia(dahliaConfig)],});Values passed to dahlia({...}) override theme.config.json.