Config Reference
Every public docgo.config.mjs option, type, default, and behavior.
All options live in docgo.config.mjs and are optional.
import { defineConfig } from '@kyechan99/docgo';
export default defineConfig({
title: 'My Docs',
});Site
title
Site name used in page titles and the brand fallback.
description
Default page description.
docsDir
Source docs directory.
outDir
Build output directory.
baseUrl
URL prefix for generated assets and internal navigation under sub-path hosting.
siteUrl
Absolute site URL for canonical URLs, sitemap entries, and absolute llms.txt links.
Extension
plugins
Plugin hooks for config extension, MDX transforms, and page-generation side effects.
mdxComponents
Components made available to MDX rendering.
clientPreviews
Client-only preview components available to MDX <ClientPreview /> islands.
previewProvider
React wrapper applied around every client-only preview, similar to a Storybook decorator.
previewStylesheets
Docgo-managed stylesheet hrefs that should also be copied into preview iframes.
Head
head
Structured head entries: [tag, attrs] or [tag, attrs, innerHTML].
headFile
Raw HTML file injected into every page head. Missing files are ignored.
SEO
seo.favicon
Favicon link entries.
seo.image
Default Open Graph and Twitter preview image.
seo.twitter
Twitter/X card metadata. A string is treated as site.
seo.jsonLd
Emit default JSON-LD or custom JSON-LD objects.
seo.sitemap
Emit sitemap.xml when siteUrl is configured.
seo.robots
Emit robots.txt, or provide raw content/rules.
seo.llmsTxt
Emit llms.txt for AI/search consumption.
seo.noindex
Add noindex,nofollow globally unless page frontmatter overrides it.
Branding and Navigation
logo
Header brand logo. Use false to hide the logo mark.
siteTitle
Override or hide the brand text.
nav
Header navigation. Supports links and dropdowns.
sidebar
Sidebar tree or prefix-matched sidebar map.
socialLinks
Header and footer social links with built-in icons for common platforms.
localizedNav
When true, brand and footer links stay in the current locale/version context.
Page Chrome
editLink
Edit link. :path in pattern is replaced by the docs-relative source path.
lastUpdated
Show the file last-updated date below the article.
outline
Controls which heading levels appear in the right-side outline.
footer
Compact site footer content. Set null to hide it.
docFooter
Prev/next labels. Set either side to false to hide it.
search
Enable built-in search, customize the index, or render a custom provider.
docs Theme Namespace
docs.menuTitle
Mobile/sidebar menu title.
docs.tocTitle
Right-side table-of-contents title.
docs.tocActiveMode
Active TOC behavior.
docs.tocHeadings
Heading levels included in the page TOC.
docs.tocProgress
Show TOC scroll progress styling.
docs.header.fullWidth
Controls header width behavior.
docs.navbar.links
Legacy navbar links. Prefer top-level nav for new sites.
docs.footer.text
Legacy footer text. Prefer top-level footer for new sites.
docs.footer.links
Legacy footer links.
i18n
i18n.defaultLocale
Default locale code. The default locale is omitted from URLs.
i18n.locales
Available locales. Entries may override nav, sidebar, and footer.
Locale Entry
code
Locale code used in source paths.
label
Display label in the locale switcher.
link
Display-only metadata reserved for custom themes.
nav
Locale-specific nav override.
sidebar
Locale-specific sidebar override.
footer
Locale-specific footer override.
Versioning
versioning.defaultVersion
Default version code. The default version is omitted from URLs.
versioning.versions
Available documentation versions.
Types
NavItem
interface NavItem {
text: string;
link?: string;
activeMatch?: string;
items?: NavItem[];
}SidebarItem
interface SidebarItem {
text?: string;
link?: string;
collapsed?: boolean;
items?: SidebarItem[];
}DocgoPlugin
interface DocgoPlugin {
name?: string;
extendConfig?: (config: ResolvedConfig) => ResolvedConfig | void | Promise<ResolvedConfig | void>;
transformMdx?: (source: string, context: TransformMdxContext) => string | Promise<string>;
remarkPlugins?: any[] | ((context: TransformMdxContext) => any[]);
rehypePlugins?: any[] | ((context: TransformMdxContext) => any[]);
viteConfig?: (config: any, context: { command: 'serve' | 'build'; cwd: string }) => any | void;
onPageGenerated?: (page: GeneratedPage) => void | Promise<void>;
}
interface TransformMdxContext {
filePath: string;
route: string;
srcDir: string;
}SearchConfig
interface SearchConfig {
provider?: 'local' | 'custom';
index?: boolean | { path?: string };
label?: string;
placeholder?: string;
component?: (context: SearchRenderContext) => any;
}
interface SearchRenderContext {
locale: string;
version: string;
baseUrl: string;
indexPath: string;
}GeneratedPage
interface GeneratedPage {
route: string;
outputPath: string;
sourcePath: string;
title: string;
locale: string;
version: string;
}