category.json
Overview
The _category_.json file is a configuration metadata file used primarily in documentation systems such as Docusaurus to organize and structure documentation content into logical categories. This particular file defines a category named "Agent Components", which groups related documentation pages under one cohesive heading. It also controls the ordering and linking behavior of this category within the documentation sidebar or navigation.
In this context, the file is part of the documentation for RAGFlow's agent components, providing users with a structured and navigable reference to these components.
File Structure and Properties
The file contains a single JSON object with the following properties:
Property | Type | Description |
|---|---|---|
String | The display name of the category as it appears in the documentation sidebar or navigation. | |
Number | A numeric value determining the order of this category relative to others. Lower numbers appear first. | |
Object | Defines the behavior and metadata for the category's index page or landing page. |
Detailed Explanation of Each Property
label
Purpose: Sets the human-readable title for this category.
Value:
"Agent Components"Usage Example:
When rendering the sidebar, this label will be shown as the category title under which related documents are grouped.
position
Purpose: Controls the ordering of this category among others.
Value:
20Usage Example:
Categories with position: 1 will appear before those withposition: 20. This helps in prioritizing important topics.
link
Purpose: Configures the category index page's behavior.
Properties:
type: Indicates the link type. Here, "generated-index" means the documentation system will automatically generate an index page listing all documents in this category.description: A short summary displayed on the generated index page.
Usage Example:
The generated index page will have the description:"A complete reference for RAGFlow's agent components."
How This File Fits Into the System
Documentation Structure:
This file is part of the documentation content hierarchy. It is used by documentation frameworks (e.g., Docusaurus) to organize markdown files or other documentation pages under the "Agent Components" category.Navigation and UX:
The label and position properties help render the sidebar navigation or table of contents, making it easier for users to find relevant agent component documentation.Index Page Generation:
The link property with "generated-index" enables automatic creation of a category landing page, summarizing all documents in this group without manual page creation. This improves maintainability and user experience.
Usage Example
Assuming you have multiple markdown files documenting different agent components (e.g., agent1.md, agent2.md), placing _category_.json in the relevant directory will:
Group those markdown files under the "Agent Components" category.
Display "Agent Components" in the sidebar at the position determined by
20.Provide an auto-generated index page with the description from the link property.
Important Implementation Details
This file does not contain any executable code or algorithms.
It serves purely as metadata for documentation tooling.
The "generated-index" link type is a feature specific to the documentation framework used and triggers automatic index generation.
The file must be placed in the folder containing related documentation files to have effect.
Mermaid Diagram: Documentation Category Structure
This flowchart visualizes how the _category_.json organizes documentation content and interacts with the documentation system.
flowchart TD
A[_category_.json] --> B[Category: "Agent Components"]
B --> C[Documentation Files (e.g. agent1.md, agent2.md)]
B --> D[Generated Index Page]
style A fill:#f9f,stroke:#333,stroke-width:2px
style B fill:#bbf,stroke:#333,stroke-width:1px
style C fill:#bfb,stroke:#333,stroke-width:1px
style D fill:#fbf,stroke:#333,stroke-width:1px
Summary
The _category_.json file is a key configuration artifact for organizing documentation content. In this case, it defines a category called "Agent Components" for RAGFlow's documentation, controls its position in the sidebar, and enables an auto-generated index page with a descriptive summary. It enhances navigability and structure in the documentation system but contains no executable logic itself.