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:Apache Druid Docusaurus Site Config

From Leeroopedia


Knowledge Sources
Domains Website, Documentation, Configuration
Last Updated 2026-02-10 10:00 GMT

Overview

website/docusaurus.config.js is the central Docusaurus configuration file that defines the site metadata, theme, navigation, plugins, and build settings for the Apache Druid documentation website at druid.apache.org.

Description

This JavaScript module exports a configuration object consumed by the Docusaurus static site generator. It sets the site title ("Apache Druid"), base URL, organization name, and deploys the @docusaurus/preset-classic preset with docs sourced from the ../docs directory and routed under /docs/latest. It configures client-side redirects via the imported Redirects array, enables full-text search with docusaurus-lunr-search, and adds Mermaid diagram rendering support. The theme configuration defines the navbar with links to Technology, Powered By, Use Cases, Docs, Community, Apache, and Download pages, plus a light-mode-only color scheme.

Usage

Modify this file when changing the Druid website structure, updating navbar links, adding new plugins, or adjusting theme settings. It is the primary entry point for Docusaurus site builds.

Code Reference

Source Location

Signature

const Redirects = require('./redirects.js').Redirects;

module.exports = {
  title: "Apache\u00ae Druid",
  tagline: "A fast analytical database",
  url: "https://druid.apache.org",
  baseUrl: "/",
  organizationName: "Apache",
  projectName: "ApacheDruid",
  presets: [["@docusaurus/preset-classic", { docs: { ... }, blog: {}, theme: { ... } }]],
  plugins: [
    ["@docusaurus/plugin-client-redirects", { redirects: Redirects }],
    "docusaurus-lunr-search",
    "@docusaurus/theme-mermaid"
  ],
  themeConfig: {
    colorMode: { defaultMode: "light", disableSwitch: true },
    navbar: { logo: { ... }, items: [ ... ] },
    footer: { ... }
  }
};

Import

# Build the website locally
cd website
npm install
npm run build

# Start development server
npm run start

I/O Contract

Inputs

Name Type Required Description
title string Yes Site title displayed in browser tabs and metadata
url string Yes Production URL of the website (https://druid.apache.org)
baseUrl string Yes Base URL path for the site (default "/")
docs.path string Yes Relative path to the documentation source directory ("../docs")
docs.routeBasePath string Yes URL prefix for documentation pages ("/docs/latest")
docs.sidebarPath string Yes Path to the sidebar configuration file ("sidebars.json")
docs.editUrl string No Base URL for "Edit this page" links pointing to the GitHub repository
redirects Array No Array of redirect rules imported from redirects.js

Outputs

Name Type Description
Static website HTML/CSS/JS Complete static site generated by Docusaurus into the build/ directory
Client-side redirects HTML Redirect pages generated for each entry in the Redirects array
Search index JSON Lunr search index generated for full-text documentation search

Usage Examples

Modifying the Navbar

// Add a new navbar item in themeConfig.navbar.items:
{
  "href": "/new-section",
  "label": "New Section",
  "position": "right"
}

Adding a New Plugin

// Add to the plugins array:
plugins: [
  ["@docusaurus/plugin-client-redirects", { redirects: Redirects }],
  "docusaurus-lunr-search",
  "@docusaurus/theme-mermaid",
  "new-docusaurus-plugin"
]

Changing Documentation Source Path

// Modify in presets configuration:
"docs": {
  "path": "../docs",
  "routeBasePath": "/docs/latest",
  "sidebarPath": "sidebars.json"
}

Related Pages

Page Connections

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