# Page Metadata Format ## Overview Redis documentation pages include AI-friendly metadata that helps AI agents understand page structure, content, and navigation. This metadata is automatically generated during the Hugo build process and embedded in both HTML and Markdown output formats. ## Metadata Structure ### Core Fields (Required) - **`title`** (string, required): The page title - **`description`** (string, required): A brief description of the page content ### Navigation Fields - **`tableOfContents`** (object): Hierarchical structure of page sections - **`sections`** (array): Array of top-level sections - **`id`** (string): Unique identifier matching the heading anchor ID - **`title`** (string): Display title of the section - **`children`** (array, optional): Nested subsections with the same structure ### Categorization Fields - **`categories`** (array): Category tags for the page (e.g., `["docs", "develop", "stack"]`) - **`scope`** (string): Scope or domain of the page content - **`topics`** (array): Related topics - **`relatedPages`** (array): Links to related documentation pages ### Command Reference Fields (for `/commands/` pages) - **`arguments`** (array): Command arguments - **`syntax_fmt`** (string): Command syntax format - **`complexity`** (string): Time complexity of the command - **`group`** (string): Command group - **`command_flags`** (array): Flags associated with the command - **`acl_categories`** (array): ACL categories for the command - **`since`** (string): Redis version when the command was introduced - **`arity`** (integer): Number of arguments the command accepts - **`key_specs`** (array): Key specifications for the command ### Code Examples Fields - **`codeExamples`** (array): Array of code examples found on the page - **`id`** (string): Unique identifier for the code example - **`description`** (string, optional): Description of what the code example demonstrates - **`difficulty`** (string, optional): Difficulty level - one of `"beginner"`, `"intermediate"`, `"advanced"` (defaults to `"beginner"`) - **`buildsUpon`** (array, optional): Array of example step IDs that this example builds upon - Used to indicate learning progression and dependencies between examples - Example: `["set_get"]` means this example requires understanding the "set_get" example first - Multiple dependencies: `["lpush_rpush", "lpop_rpop"]` indicates this example builds on both - **`codetabsId`** (string, optional): DOM element ID of the codetabs container - **`languages`** (array): Array of language-specific code variants - **`id`** (string): Display name of the language (e.g., `"Python"`, `"Node.js"`, `"Java-Sync"`) - **`panelId`** (string): DOM element ID of the code panel for this language - **`langId`** (string): Stable language identifier (e.g., `"python"`, `"javascript"`, `"java"`) - **`clientId`** (string): Stable client library identifier (e.g., `"redis-py"`, `"node-redis"`, `"lettuce"`) - **`clientName`** (string): Human-readable client library name (e.g., `"redis-py"`, `"Jedis"`, `"Lettuce"`) ### Metadata Location Fields - **`location`** (string): Where this metadata is located in the HTML document - `"head"` - Metadata is in a ` ``` **Use this location for:** - Static analysis and extraction - AI agent processing - Schema validation - Caching (primary copy) #### Fallback: Body (Hidden Div) ```html