Configuration
Configure Docgo site metadata, theme UI, navigation, search, i18n, versioning, and plugins.
Docgo is configured with docgo.config.mjs at the project root.
import { defineConfig } from '@kyechan99/docgo';
export default defineConfig({
title: 'My Docs',
description: 'Documentation for my product',
});Every option is optional. Missing values are filled from Docgo defaults.
Site metadata
export default defineConfig({
title: 'Example Docs',
description: 'Developer documentation for an example product.',
docsDir: 'docs',
outDir: 'dist',
baseUrl: '/',
siteUrl: 'https://docs.example.com',
});titleis used for the brand and page titles.descriptionis the default page description.docsDiris the source directory.outDiris the build output directory.baseUrlprefixes generated asset and internal navigation URLs for sub-path hosting.siteUrlenables canonical URLs and absolute SEO output.
Branding
export default defineConfig({
logo: { src: '/logo.png', alt: 'Example Docs' },
siteTitle: 'Example Docs',
});logo can be:
- a string path
{ src, alt }{ light, dark, alt }falseto hide the logo mark
siteTitle can be a string override or false to hide brand text.
Navigation
Use nav for the header menu and sidebar for section navigation.
export default defineConfig({
nav: [
{ text: 'Guide', link: '/guide/getting-started', activeMatch: '/guide/' },
{
text: 'Reference',
items: [{ text: 'Config Reference', link: '/guide/config-reference' }],
},
],
sidebar: {
'/guide/': [
{
text: 'Start',
items: [{ text: 'Getting Started', link: '/guide/getting-started' }],
},
],
},
});Config links are content-relative. Docgo automatically adds the active locale and version prefixes.
Search
Search is enabled by default.
export default defineConfig({
search: true,
});Set search: false to remove the search UI and skip the generated assets/search-index/ files.
Page metadata
export default defineConfig({
editLink: {
pattern: 'https://github.com/acme/docs/edit/main/docs/:path',
text: 'Edit this page',
},
lastUpdated: { text: 'Updated' },
docFooter: {
prev: 'Previous',
next: 'Next',
},
});editLink.patternreplaces:pathwith the docs-relative source path.lastUpdatedreads the file timestamp and shows it below the article.docFooter.prevanddocFooter.nextcustomize prev/next labels.- Set either
docFooter.prevordocFooter.nexttofalseto hide that side.
Footer
Use the top-level footer option for the site footer shown below content.
export default defineConfig({
socialLinks: [
{ icon: 'github', link: 'https://github.com/owner/repo' },
{ icon: 'discord', link: 'https://discord.gg/example' },
],
footer: {
message: 'Clear documentation for developers and contributors.',
copyright: 'Copyright © 2026 kyechan99.',
},
});footer.messageis shown as the primary footer message.footer.copyrightis shown as secondary copyright text.socialLinksare shown as icon actions on the right. Built-in icons includegithub,x,twitter,discord,linkedin,youtube,slack,npm, andmastodon; unknown names use a generic external-link icon.- Set
footer: nullto hide the site footer.
A locale entry may provide its own footer to translate the message and copyright.
For visual changes such as spacing, colors, or adding a background image, load
custom CSS from head.html. The footer markup exposes stable classes including
.dg-footer, .dg-footer-intro, .dg-footer-social, .dg-footer-message, and
.dg-footer-copyright.
i18n
export default defineConfig({
i18n: {
defaultLocale: 'en',
locales: [
{ code: 'en', label: 'English' },
{ code: 'ko', label: 'Korean' },
],
},
});A locale may override nav and sidebar when labels need translation.
Versioning
export default defineConfig({
versioning: {
defaultVersion: 'latest',
versions: [
{ code: 'latest', label: 'Latest' },
{ code: 'v1', label: 'v1' },
],
},
});The default version is omitted from URLs. Non-default versions are prefixed.
Theme options
The docs namespace controls theme-level behavior.
export default defineConfig({
docs: {
menuTitle: 'Docs',
tocTitle: 'On this page',
tocActiveMode: 'multiple',
tocHeadings: ['h2', 'h3'],
tocProgress: true,
header: {
fullWidth: false,
},
footer: {
text: 'Example Docs',
links: [{ label: 'GitHub', href: 'https://github.com/kyechan99/docgo' }],
},
},
});The docs.footer options are kept for older projects. Prefer the top-level
footer option for new sites.
Plugins
Plugins can extend resolved config, transform MDX source, and observe generated pages.
export default defineConfig({
plugins: [
{
name: 'replace-product-name',
transformMdx(source) {
return source.replaceAll('__PRODUCT__', 'ExampleProduct');
},
},
],
});Preview
Preview-specific configuration lives in Preview.
