Skip to content

Site configuration reference

Docfuse loads one docfuse.config.ts, .mts, .cts, .js, .mjs, or .cjs from the project root. Multiple variants are ambiguous, and unknown fields or invalid values fail validation.

ts
import { defineConfig } from 'docfuse'export default defineConfig({  title: 'Acme Docs',  description: 'Acme platform documentation',  siteUrl: 'https://docs.acme.com',  basePath: '/',  requiredVersion: '^0.1.0'})

defineConfig() leaves the value unchanged while providing type checking and editor completion for the complete object and its nested fields. A directly exported object still goes through the build-time schema.

Site and directories

table
titleDocfuseSite name and default browser title
descriptionTechnical documentationSite description used when a page has no description
siteUrlunsetHTTP(S) origin used by canonical URLs, hreflang, and the sitemap; no path, query, or hash
basePath/Subpath deployment prefix, beginning and ending with /
editUrlunsetHTTP(S) prefix for “Edit this page”; queries and hashes are rejected
githubunsetHTTP(S) URL for the header GitHub link
requiredVersionunsetSemver range that the running CLI must satisfy
docsDirdocsContent directory for a single-version site; cannot be combined with versions
outputDir.docfuse/distStatic site output directory
styles[]Project CSS files loaded after the default stylesheet
layout.headertrueRender brand, top navigation, search entry, and locale/version controls

Keep siteUrl as the origin and express a deployment subdirectory with basePath. Omit unresolved editUrl and github values. Disabling layout.header leaves the content sidebar, page outline, and search shortcut available.

Markdown

table
markdown.htmlsanitizeRaw HTML policy: trusted, sanitize, or strip; MDX remains trusted executable code
markdown.code.themesbuilt-in light/dark themesReplace the Shiki theme names
markdown.code.fallbackLanguagetextFence label used when no language is declared
markdown.code.unknownLanguagewarnHandle an unknown fence language with warn, error, or plain-text
markdown.featuresall enabledDisable callouts, tabs, code groups, steps, terminals, document blocks, tables, or code blocks independently
markdown.labelsbuilt-in by localeOverride accessible labels for Markdown interactions
markdown.plugins[]Trusted build-time Markdown plugins, applied in array order

The standalone <Markdown> component defaults to html: 'strip', unlike the Docfuse site default. See Markdown for integration and Official plugins for plugin setup.

table
theme.logo / logoDarkunsetLight and dark brand images; logoDark requires logo and darkMode: true
theme.faviconbuilt-in iconSite favicon
theme.accentColordocfusePreset name or valid CSS color
theme.baseColorpaperpaper, neutral, slate, zinc, or stone
theme.darkModefalseGenerate the dark theme and its switch
theme.radius8Site shortcut for small, medium, and large radii
theme.sidebarWidth17.5remDesktop sidebar width
theme.outlineWidth18.75remDesktop page-outline width
theme.tokens{}Semantic color, typography, layout, geometry, and motion overrides
search.enabledtrueGenerate a search index and browser entry
search.providercompactBuilt-in compact or a SearchProvider object such as pagefind()

See Theme customization and Search for task workflows.

Site capabilities

table
extensions[]{ resolve, options } entries; resolve starts with ./ and options are JSON-serializable
navigation{}Locale-keyed { text, link }[]; derived from top-level content sections when omitted
versionscurrent version current{ current, items }; current uses /, and every id and base is unique
redirects{}Old-to-current route map; chains, cycles, and real-page collisions fail validation
advertisingunset{ image, href, alt, label? } image slot beside the page outline

See navigation, versions, redirects, extensions, and advertising for workflows.

Internationalization and AI output

table
i18n.defaultLocalezhDefault locale without a URL prefix
i18n.locales['zh']Locales included in the build
i18n.localeNames{}Display names in the locale switcher
i18n.messages{}Site and Markdown UI overrides by locale
ai.llmsTxttrueEmit llms.txt
ai.llmsFullTxttrueEmit llms-full.txt or its Manifest pointer
ai.markdownIndextrueEmit ai/index.md
ai.pageSummariestrueEmit ai/summaries.json
ai.codeExamplestrueEmit ai/code-examples.json
ai.chunkSizeBytes262144Encoded byte budget for one JSONL content record
ai.llmsFullMaxBytes10485760Budget for the legacy aggregate file
ai.llmsFullOverflowmanifestWrite a Manifest pointer on overflow, or use error to fail the build
ai.versionscurrentPublish only the current version, or use all for every version

See Internationalization and AI-friendly output for setup and artifact details.