DocgoDocgo
Latest
/Site Configuration

Configuration

Configure Docgo site metadata, theme UI, navigation, search, i18n, versioning, and plugins.

Docgo is configured with docgo.config.mjs at the project root.

docgo.config.mjs
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

docgo.config.mjs
export default defineConfig({
  title: 'Example Docs',
  description: 'Developer documentation for an example product.',
  docsDir: 'docs',
  outDir: 'dist',
  baseUrl: '/',
  siteUrl: 'https://docs.example.com',
});
  • title is used for the brand and page titles.
  • description is the default page description.
  • docsDir is the source directory.
  • outDir is the build output directory.
  • baseUrl prefixes generated asset and internal navigation URLs for sub-path hosting.
  • siteUrl enables canonical URLs and absolute SEO output.

Branding

docgo.config.mjs
export default defineConfig({
  logo: { src: '/logo.png', alt: 'Example Docs' },
  siteTitle: 'Example Docs',
});

logo can be:

  • a string path
  • { src, alt }
  • { light, dark, alt }
  • false to hide the logo mark

siteTitle can be a string override or false to hide brand text.

Use nav for the header menu and sidebar for section navigation.

docgo.config.mjs
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 is enabled by default.

docgo.config.mjs
export default defineConfig({
  search: true,
});

Set search: false to remove the search UI and skip the generated assets/search-index/ files.

Page metadata

docgo.config.mjs
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.pattern replaces :path with the docs-relative source path.
  • lastUpdated reads the file timestamp and shows it below the article.
  • docFooter.prev and docFooter.next customize prev/next labels.
  • Set either docFooter.prev or docFooter.next to false to hide that side.

Use the top-level footer option for the site footer shown below content.

docgo.config.mjs
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.message is shown as the primary footer message.
  • footer.copyright is shown as secondary copyright text.
  • socialLinks are shown as icon actions on the right. Built-in icons include github, x, twitter, discord, linkedin, youtube, slack, npm, and mastodon; unknown names use a generic external-link icon.
  • Set footer: null to 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

docgo.config.mjs
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

docgo.config.mjs
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.

docgo.config.mjs
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.

docgo.config.mjs
export default defineConfig({
  plugins: [
    {
      name: 'replace-product-name',
      transformMdx(source) {
        return source.replaceAll('__PRODUCT__', 'ExampleProduct');
      },
    },
  ],
});

Preview

Preview-specific configuration lives in Preview.

Edit this page

Last updated: