{% extends "base.html" %} {# ================================================================================ CLI Reference Command Group Template (Kida-Native) ================================================================================ Renders a CLI command group's documentation showing nested commands and groups. Extends base.html to inherit theme navigation, sidebars, and styling. TEMPLATE VARIABLES: - element: DocElement for the command group (required) - page: PageContext proxy with title, metadata, tags, _path - config: Autodoc configuration - site: Site instance - section: Parent section (for navigation) Uses the `commands` filter to normalize access to subcommands, providing a consistent API via CommandView: - name, description, usage, href - is_group, is_hidden, option_count, argument_count, subcommand_count ================================================================================ #} {% from 'partials/navigation-components.html' import breadcrumbs, page_navigation, toc %} {% block content %} {# Use commands filter for normalized access - returns list of CommandView #} {% let subcommands = element | commands %} {% let qualified_name = element?.qualified_name ?? '' %} {% let page_tags = page?.tags ?? [] %} {# Three-column documentation layout #}
{# Left Sidebar: Navigation #} {# Main Content #}
{# Page Hero: Use direct macro call with explicit context #} {% from 'partials/page-hero.html' import hero_element %} {{ hero_element(element, page, config) }} {# Article Content - Unified autodoc skeleton #}
{# Usage - CLI uses spaces, not dots #} {% if qualified_name %} {% let cli_usage = qualified_name | replace('.', ' ') %}

Usage

{{ cli_usage }} [COMMAND] [OPTIONS]
{% end %} {# Commands and Sub-groups - using CommandView properties #} {% if subcommands | length > 0 %}

Commands

{% end %} {# Tags - with null-safe access #} {% if page_tags | length > 0 %} {% end %}
{# Page navigation (prev/next) at bottom - null-safe #} {% if page %} {{ page_navigation(page) }} {% end %}
{# Right Sidebar: Contextual Graph + TOC + Metadata #} {% include 'partials/docs-toc-sidebar.html' %}
{# Mobile sidebar toggle button #} {# Sidebar overlay for mobile #} {% end %}