Implementation:Datahub project Datahub Sidebars Config
| Knowledge Sources | |
|---|---|
| Domains | Documentation, Navigation, InformationArchitecture |
| Last Updated | 2026-02-10 00:00 GMT |
Overview
Docusaurus sidebar configuration that defines the complete hierarchical navigation structure for the DataHub documentation website, organizing content into major sections with categories, document references, and auto-generated listings.
Description
The sidebars.js file exports a single overviewSidebar array that defines the entire left-hand navigation tree for the DataHub documentation site. The sidebar is organized into seven major sections, each introduced by an HTML divider element: Getting Started (core features, quickstart, and feature guides), DataHub Cloud (SaaS-specific configuration and operator guides), Integrations (ingestion sources, sinks, transformers, and quickstart guides), API & SDKs (metadata standards, GraphQL, OpenAPI, Rest.li, Python SDK, Java SDK, CLI, and Actions framework), Admin (authentication, authorization, and advanced operations), Deployment (cloud provider guides and Docker/Kubernetes setup), Developers (architecture, module documentation, and advanced development guides), and Community (Slack, town halls, contributing guidelines, and release history).
The configuration uses several Docusaurus sidebar item types: doc items reference specific Markdown files by their document ID (derived from file path without extension); category items create collapsible groups with optional link pages; autogenerated items automatically populate from directory contents (used for generated ingestion sources, metamodel entities, actions, and SDK references); link items point to external URLs (such as the demo site and customer stories); and html items inject custom HTML for section dividers. Many items include a className: "saasOnly" property that conditionally shows or hides content based on whether the site is being built for the SaaS (DataHub Cloud) variant.
The file also serves a secondary purpose in the build pipeline: the generateDocsDir.ts script reads both the JSON-serialized and raw text versions of this file to verify that all documentation files are accounted for. Files that are commented out in the sidebar are still considered "accounted for," allowing documents to exist without appearing in the navigation while avoiding build warnings. The commented-out section at the bottom of the file contains a comprehensive list of deprecated or candidate-for-removal documents that have been intentionally excluded from the sidebar.
Usage
This file is referenced by docusaurus.config.js via require.resolve("./sidebars.js") and is loaded during both development (yarn start) and production builds (yarn build). It is also consumed by generateDocsDir.ts for sidebar completeness validation. Developers modify this file when adding new documentation pages, reorganizing the navigation hierarchy, or marking content as SaaS-only.
Code Reference
Source Location
- Repository: Datahub_project_Datahub
- File: docs-website/sidebars.js
Signature
module.exports = {
overviewSidebar: [
// Section: Getting Started
{ type: "html", value: "<div>Getting Started</div>", defaultStyle: true },
{ label: "What Is DataHub?", type: "category", items: [...] },
{ type: "category", label: "Features", items: [...] },
// Section: DataHub Cloud
{ type: "html", value: "<div>DataHub Cloud</div>", defaultStyle: true },
// ... SaaS-specific items with className: "saasOnly"
// Section: Integrations
{ type: "html", value: "<div>Integrations</div>", defaultStyle: true },
{ type: "category", label: "Sources", items: [
{ type: "autogenerated", dirName: "docs/generated/ingestion/sources" },
]},
// Section: API & SDKs
{ type: "html", value: "<div>API & SDKs</div>", defaultStyle: true },
// ... GraphQL, OpenAPI, Rest.li, Python SDK, Java SDK, CLI, Actions
// Section: Admin
{ type: "html", value: "<div>Admin</div>", defaultStyle: true },
// Section: Deployment
{ type: "html", value: "<div>Deployment</div>", defaultStyle: true },
// Section: Developers
{ type: "html", value: "<div>Developers</div>", defaultStyle: true },
// Section: Community
{ type: "html", value: "<div>Community</div>", defaultStyle: true },
{ "Release History": ["releases", "docs/how/updating-datahub"] },
],
};
Import
// Referenced in docusaurus.config.js
docs: {
sidebarPath: require.resolve("./sidebars.js"),
}
// Also loaded by generateDocsDir.ts for validation
const sidebars = require("./sidebars.js");
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Document IDs | String | Yes | File-path-based identifiers for each documentation page (e.g., "docs/features", "metadata-ingestion/README") |
| Auto-generated directories | Directory paths | Yes | Directories whose contents are automatically enumerated (e.g., "docs/generated/ingestion/sources") |
| className: saasOnly | String | No | CSS class name that conditionally hides items in non-SaaS builds |
Outputs
| Name | Type | Description |
|---|---|---|
| overviewSidebar | Array | Hierarchical sidebar definition consumed by Docusaurus to render the documentation navigation |
Usage Examples
// Adding a new documentation page to the Features section
{
label: "My New Feature",
type: "doc",
id: "docs/features/feature-guides/my-new-feature",
},
// Adding a SaaS-only page
{
label: "Cloud-Only Feature",
type: "doc",
id: "docs/managed-datahub/cloud-only-feature",
className: "saasOnly",
},
// Adding an auto-generated section from a directory
{
type: "category",
label: "Generated Docs",
items: [
{ type: "autogenerated", dirName: "docs/generated/my-section" },
],
},
// Commenting out a doc to keep it accessible via direct link
// but hidden from navigation (also prevents build warnings):
// "docs/some-hidden-page",