Implementation:Promptfoo Promptfoo Sidebars Config
| Knowledge Sources | |
|---|---|
| Domains | Documentation, Navigation |
| Last Updated | 2026-02-14 07:45 GMT |
Overview
Concrete configuration defining the sidebar navigation structure for the promptfoo documentation site, organizing docs into hierarchical categories.
Description
The Sidebars_Config (sidebars.js) defines the complete navigation hierarchy for the documentation site. It organizes pages into multiple sidebars including the main documentation sidebar (getting started, configuration, providers, integrations, enterprise), the red team sidebar (configuration, plugins by category, strategies, troubleshooting), and the model audit sidebar. Each entry specifies document IDs, category labels, and collapsibility.
Usage
This file is read by Docusaurus during build. Modify it when adding new documentation pages or reorganizing the navigation structure.
Code Reference
Source Location
- Repository: Promptfoo_Promptfoo
- File: site/sidebars.js
- Lines: 1-521
Signature
const redTeamSidebar = [ /* ... */ ];
module.exports = {
docs: [ /* main sidebar */ ],
redTeamSidebar,
modelAuditSidebar: [ /* ... */ ],
};
Import
// Loaded by Docusaurus via docusaurus.config.ts sidebars field
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | Static sidebar definitions |
Outputs
| Name | Type | Description |
|---|---|---|
| module.exports | SidebarsConfig | Sidebar structure consumed by Docusaurus |
Usage Examples
// Adding a new page to the main sidebar
module.exports = {
docs: [
'intro',
'getting-started',
{
type: 'category',
label: 'Configuration',
items: ['configuration/guide', 'configuration/reference'],
},
],
};