Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Datahub project Datahub Docusaurus Config

From Leeroopedia


Knowledge Sources
Domains Documentation, Frontend, WebConfiguration
Last Updated 2026-02-10 00:00 GMT

Overview

Main Docusaurus configuration file that defines the DataHub documentation website's structure, theme, navigation, plugins, and third-party integrations.

Description

The docusaurus.config.js file is the central configuration for the DataHub documentation website, built on Docusaurus v2. It supports a dual-mode deployment via the DOCUSAURUS_IS_SAAS environment variable, which toggles between the open-source DataHub documentation site and the Acryl (DataHub Cloud) SaaS variant. Key site-level settings include the title (defaulting to "DataHub"), tagline, base URL, and strict broken link handling (set to "throw" for both broken links and broken Markdown links).

The theme configuration section defines the navbar with documentation and integrations links, a version dropdown supporting archived versions (from 0.10.5 through 1.3.0), community links to Slack and GitHub, and a dark-mode footer with sections for Docs, Community, and More. It configures Algolia search integration with application ID RK0UG797F3 and index name datahubproject, Prism syntax highlighting for ini, Java, GraphQL, and shell-session languages, and light-mode-only color mode. An announcement bar is used for promoting community events such as Town Halls.

The preset and plugin section configures the @docusaurus/preset-classic with documentation sourced from the genDocs directory and sidebars from sidebars.js, a blog section repurposed as "DataHub Learn", Google Tag Manager and gtag analytics, client-side redirects for legacy URLs, ideal image optimization, SASS support, and a GraphQL documentation plugin. The webpack configuration uses SWC loader for TypeScript and TSX compilation. Several third-party scripts are loaded including LuckyOrange analytics, RevenueHero scheduling, Clearbit tags, Reo analytics, and a RunLLM AI assistant widget.

Usage

This configuration file is used by Docusaurus to build and serve the DataHub documentation website. It is consumed during yarn build or yarn start in the docs-website directory. Developers modify this file to change site-wide settings, add new plugins, update navigation, or configure integrations. The SaaS/open-source toggle allows the same codebase to serve both deployment variants.

Code Reference

Source Location

Signature

module.exports = {
  title: process.env.DOCUSAURUS_CONFIG_TITLE || "DataHub",
  tagline: "The #1 Open Source Metadata Platform",
  url: process.env.DOCUSAURUS_CONFIG_URL || "https://docs.datahub.com",
  baseUrl: process.env.DOCUSAURUS_CONFIG_BASE_URL || "/",
  onBrokenLinks: "throw",
  onBrokenMarkdownLinks: "throw",
  themeConfig: { /* navbar, footer, prism, algolia */ },
  presets: [ ["@docusaurus/preset-classic", { docs, blog, theme, pages, googleTagManager, gtag }] ],
  plugins: [ /* client-redirects, ideal-image, sass, graphql */ ],
};

Import

// This file is consumed by Docusaurus automatically.
// Reference it in package.json scripts:
// "start": "docusaurus start",
// "build": "docusaurus build"

// Environment variables that control behavior:
// DOCUSAURUS_IS_SAAS=true       - Toggles SaaS/Acryl branding
// DOCUSAURUS_CONFIG_TITLE       - Overrides site title
// DOCUSAURUS_CONFIG_URL         - Overrides site URL
// DOCUSAURUS_CONFIG_BASE_URL    - Overrides base URL path

I/O Contract

Inputs

Name Type Required Description
DOCUSAURUS_IS_SAAS Environment variable No When set to "true", enables SaaS/Acryl branding and disables search indexing
DOCUSAURUS_CONFIG_TITLE Environment variable No Overrides the default site title ("DataHub")
DOCUSAURUS_CONFIG_URL Environment variable No Overrides the default site URL ("https://docs.datahub.com")
DOCUSAURUS_CONFIG_BASE_URL Environment variable No Overrides the default base URL path ("/")
genDocs/ Directory Yes Generated documentation directory containing processed Markdown files
sidebars.js JavaScript file Yes Sidebar navigation structure definition
graphql/combined.graphql GraphQL schema Yes Combined GraphQL schema for API documentation generation

Outputs

Name Type Description
Static website HTML/CSS/JS Built documentation website output in the build directory
Site configuration Object Exported configuration object consumed by the Docusaurus framework

Usage Examples

# Start the development server
cd docs-website && yarn start

# Build the production documentation site
cd docs-website && yarn build

# Build with SaaS branding
DOCUSAURUS_IS_SAAS=true yarn build

# Override the site URL for staging
DOCUSAURUS_CONFIG_URL=https://staging-docs.datahub.com yarn build

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment