GitHub

Guides

Installation

Install Barodoc: CLI (zero-config) or manual Astro setup

Two ways to use Barodoc: CLI (zero-config) for a docs-only project, or Manual (Astro) for a full Astro app.

No package.json or Astro config in your repo. You only have docs/, public/, and barodoc.config.json.

Create project

pnpm create barodoc my-docs
cd my-docs

Structure created

PathPurpose
docs/en/Markdown/MDX files for the default locale. Add docs/ko/, etc. for i18n.
public/Static assets (logo, favicon).
barodoc.config.jsonSite name, navigation, theme, i18n, topbar, etc.
.gitignoreIgnores .barodoc/, dist/, node_modules/.

No src/ or astro.config.mjs in the project. The CLI generates a temporary Astro project under .barodoc/ when you run commands.

Commands

# Development
npx barodoc serve

# Optional: custom port or config
npx barodoc serve --port 3000
npx barodoc serve --config custom.config.json

# Production build (output: dist/)
npx barodoc build

# Preview production build
npx barodoc preview

Install is not required in the project; npx barodoc runs the CLI.


Manual installation (Astro integration)

Use this when you want a normal Astro project (e.g. custom routes, other integrations). Content lives under src/content/docs/, and you run pnpm dev / pnpm build.

1. Create Astro project

pnpm create astro@latest my-docs
cd my-docs

2. Install Barodoc packages

pnpm add @barodoc/core @barodoc/theme-docs astro

3. Configure Astro

In astro.config.mjs:

import { defineConfig } from "astro/config";
import barodoc from "@barodoc/core";
import docsTheme from "@barodoc/theme-docs";

export default defineConfig({
  integrations: [
    barodoc({
      config: "./barodoc.config.json",
      theme: docsTheme(),
    }),
  ],
});

4. Create config file

Create barodoc.config.json in the project root:

{
  "name": "My Docs",
  "logo": "/logo.svg",
  "navigation": [
    {
      "group": "Getting Started",
      "pages": ["introduction", "quickstart"]
    }
  ],
  "i18n": {
    "defaultLocale": "en",
    "locales": ["en"]
  }
}

5. Add content

Create src/content/docs/en/introduction.mdx (and optionally other locales under src/content/docs/ko/, etc.). See Content structure for layout and slugs.

---
title: Introduction
description: Welcome to the docs
---

# Welcome

Your documentation starts here.

6. Run the project

pnpm dev
pnpm build

Content structure and URL rules are the same as in CLI mode; only the directory is src/content/docs/ instead of docs/.