GitHub

Guides

Configuration

Configure your Barodoc site

Barodoc is configured through barodoc.config.json.

Full Example

{
  "name": "My Documentation",
  "logo": "/logo.svg",
  "favicon": "/favicon.ico",
  "theme": {
    "colors": {
      "primary": "#0070f3"
    }
  },
  "i18n": {
    "defaultLocale": "en",
    "locales": ["en", "ko"],
    "labels": {
      "en": "English",
      "ko": "한국어"
    }
  },
  "navigation": [
    {
      "group": "Getting Started",
      "group:ko": "시작하기",
      "pages": ["introduction", "quickstart"]
    }
  ],
  "topbar": {
    "github": "https://github.com/user/repo"
  },
  "plugins": ["@barodoc/plugin-sitemap"]
}

Options

name

The site name displayed in the header.

Path to the logo image in the public/ directory.

favicon

Path to the favicon in the public/ directory.

theme.colors

Customize the primary color theme:

{
  "theme": {
    "colors": {
      "primary": "#0070f3"
    }
  }
}

theme.fonts

Override heading and body fonts:

{
  "theme": {
    "fonts": {
      "heading": "Inter, sans-serif",
      "body": "Inter, sans-serif",
      "code": "JetBrains Mono, monospace"
    }
  }
}

theme.radius

Border radius for UI elements (e.g. "0.5rem", "8px").

Define the sidebar navigation structure. Use group for the default locale and group:LOCALE for translated group names (see I18n):

{
  "navigation": [
    {
      "group": "Section Name",
      "group:ko": "섹션 이름",
      "pages": ["page-slug", "nested/page"]
    }
  ]
}

topbar

Add links to the top navigation:

{
  "topbar": {
    "github": "https://github.com/user/repo",
    "discord": "https://discord.gg/invite",
    "twitter": "https://twitter.com/username"
  }
}

Enable or disable full-text search (Pagefind):

{
  "search": {
    "enabled": true
  }
}

customCss

Paths to additional CSS files (relative to project root or from public/). They are loaded after the theme styles:

{
  "customCss": ["./src/custom.css"]
}

plugins

Load Barodoc plugins (sitemap, analytics, etc.). In full custom (Astro) mode, install the plugin packages first (e.g. pnpm add @barodoc/plugin-sitemap).

{
  "plugins": [
    "@barodoc/plugin-sitemap",
    ["@barodoc/plugin-analytics", { "provider": "google", "id": "G-XXXXX" }]
  ]
}