Skip to content

Documentation Configuration

How to configure docs tabs, sidebars, and site metadata for the OpenQuok documentation site.

2 min read

Connect your agent today

Draft from chat, review in your calendar, and publish only what you approve.

Start for $0

Site Configuration

Edit the docs config in:

  • web/src/lib/docs/constants/config.ts — site metadata (title/description/social), docsTabs (one sidebar per tab), i18n
  • web/src/lib/docs/constants/config.ts — assembled docsConfig (merged sidebar, TOC defaults, optional version selector)

The header tab bar is docsTabs, left to right: General, Cloud, Self-hosting, CLI, MCP, Public API, Contributing.

export const docsTabs: DocsTabDefinition[] = [
  { id: 'general', label: 'General', sidebar: docsSidebarGeneral },
  { id: 'cloud', label: 'Cloud', sidebar: docsSidebarCloud },
  { id: 'self-hosting', label: 'Self-hosting', sidebar: docsSidebarSelfHosting },
  { id: 'cli', label: 'CLI', sidebar: docsSidebarCli },
  { id: 'mcp', label: 'MCP', sidebar: docsSidebarMcp },
  { id: 'public-api', label: 'Public API', sidebar: docsSidebarPublicApi },
  { id: 'contributing', label: 'Contributing', sidebar: docsSidebarContributing }
];

export const docsConfig: DocsConfig = {
  site: docsSite,
  sidebar: docsSidebarMerged, // flattened from docsTabs (search, prev/next, llms.txt)
  tabs: docsTabs,
  toc: {
    minDepth: 2,
    maxDepth: 3
  }
};
TabSidebar constantTab home
GeneraldocsSidebarGeneral (getting-started)/docs
ClouddocsSidebarCloud/docs/cloud
Self-hostingdocsSidebarSelfHosting/docs/getting-started-for-dev
CLIdocsSidebarCli/docs/getting-started-for-cli
MCPdocsSidebarMcp/docs/getting-started-for-mcp
Public APIdocsSidebarPublicApi (includes oauth2-for-apps)/docs/getting-started-for-public-api
ContributingdocsSidebarContributing/docs/developer-guidelines

Third-party app OAuth (oauth2-for-apps) belongs on Public API. Operator OAuth server setup stays under Self-hosting (admin).

Path matching lives in web/src/lib/docs/navigation.ts. Unknown slugs resolve to General, not Self-hosting.

Auto-generated Sections

Use autogenerate to build sidebar sections from a directory. Attach each section to the tab that should show it:

export const docsSidebarGeneral: DocsSidebarSection[] = [
  {
    label: 'Get started',
    autogenerate: { directory: 'getting-started' }
  },
  {
    label: 'Channels',
    autogenerate: { directory: 'channels' }
  }
];

This scans src/content/docs/getting-started/ and creates nav items for each .md file.

Manual Sections

You can also define items manually:

{
  label: 'Resources',
  items: [
    { label: 'GitHub', href: 'https://github.com' },
    { label: 'Discord', href: 'https://discord.gg/example' }
  ]
}

Frontmatter Options

Each markdown file supports these frontmatter fields:

---
title: Page Title        # Required — displayed as the page heading
description: A summary   # Optional — shown below the title and in meta tags
order: 1                 # Optional — controls sidebar ordering (lower = higher)
draft: true              # Optional — hides the page from navigation
sidebar:
  label: Custom Label    # Optional — overrides the title in the sidebar
---
Search documentation
Find a docs page
Discord Support