Home
Reference

Navigation

Tabs, groups, pages, and slugs.

Navigation is the only required field in sourcey.config.ts. It defines the tab structure, sidebar groups, and page ordering.

TabConfig

interface TabConfig {
  tab: string;           // display name (required)
  slug?: string;         // URL slug (defaults to slugified tab name)
  groups?: GroupConfig[]; // markdown pages organized in groups
  openapi?: string;      // path to an OpenAPI spec
  mcp?: string;          // path to an mcp.json (MCP server snapshot)
  doxygen?: DoxygenConfig; // Doxygen XML config
}

Each tab must have exactly one content source: groups, openapi, mcp, or doxygen.

GroupConfig

interface GroupConfig {
  group: string;    // sidebar section header (required)
  pages: string[];  // page slugs (required)
}

Pages are listed by slug (filename without extension). Sourcey resolves "quickstart" to quickstart.md or quickstart.mdx in the config directory.

Slug resolution

ConfigGenerated slugExample URL
slug: ""(root)/introduction
slug: "guides"guides/guides/webhooks
slug: "api"api/api/
slug omittedslugified tab nameTab "API Reference" becomes /api-reference/
Warning

Tab slugs must be unique. Page slugs must be unique within a tab. Duplicate slugs cause a build error with a message identifying the collision.

Glob patterns

Page arrays support trailing glob patterns for automatic file discovery:

groups: [{
  group: "API Guides",
  pages: ["api-*"],
  // Matches: api-auth.md, api-errors.md, api-pagination.md
}]

Matched files are sorted alphabetically. Use explicit page lists when order matters.

Page ordering

Pages appear in the sidebar in the order they're listed in the pages array. Groups appear in the order they're defined in the groups array. Tabs appear in the order they're defined in the tabs array.

There's no implicit ordering. The config is the source of truth for navigation structure.