Domphy

Configuration

defineConfig

import { defineConfig } from "@domphy/press"

export default defineConfig({ /* SiteConfig */ })

defineConfig is a passthrough helper for TypeScript inference — it returns its argument typed as SiteConfig.

SiteConfig

FieldTypeDescription
titlestringSite title — appended to page titles
descriptionstringDefault meta description
basestringDeploy base path (e.g. "/" or "/docs/")
hostnamestringCanonical hostname for sitemap and OG (e.g. "https://example.com")
srcDirstringAbsolute path to the Markdown source directory
outDirstringAbsolute path to the build output directory
headstring[]Raw <head> tags injected verbatim (analytics, icons)
themeConfigThemeConfigNavigation, sidebar, footer, social links, etc.
lastUpdatedboolean?Show last-updated date from git log. Default: false
localesRecord<string, LocaleConfig>?i18n locale routing

ThemeConfig

FieldTypeDescription
navNavItem[]Top navigation bar
sidebarRecord<string, SidebarItem[]>Sidebar keyed by route prefix — longest match wins
logostring | { light: string; dark: string }?Logo image — single URL or separate light/dark variants
searchfalse | { placeholder?, limit? }?Built-in local search. Pass false to disable
footerMessagestring?Footer content
socialLinksSocialLink[]?GitHub, Twitter, Discord, etc. icon links in header
editLinkEditLink?"Edit this page" link (pattern: https://github.com/…/:path)
outline{ level: [number, number] }?TOC heading levels. Default: [2, 3]
tocTitlestring?TOC section heading text. Default: "On this page"
mermaidboolean | { cdn? }?Enable Mermaid diagrams (loaded via CDN)
announcementBar{ id?, text, dismissible? }?Dismissible banner above the page
slotsLayoutSlots?Override individual layout regions with custom Domphy elements
{ text: string; link?: string; items?: { text: string; link: string }[] }
  • Flat link: { text: "Guide", link: "/guide/" }
  • Dropdown: { text: "Packages", items: [...] }

SidebarItem

{
  text: string
  link?: string
  items?: SidebarItem[]
  badge?: { text: string; type?: "tip" | "info" | "warning" | "danger" }
  collapsed?: boolean
}
{ icon: "github" | "twitter" | "discord" | "youtube" | "linkedin" | "mastodon" | "npm" | "bluesky" | string; link: string; ariaLabel?: string }

For custom icons, pass a URL or SVG data URI as icon.