{% extends "base.html" %} {# API Hub Section Index Template Renders an aggregating section that shows all API documentation types (Python, REST, CLI) using a card-based layout. This template is used for sections with type="api-hub" which aggregate multiple autodoc outputs under a shared prefix (e.g., /api/). Uses autodoc.css for all styling. This template receives: - section: Section object for the aggregating section - page: Page object (section index page) - config: Autodoc configuration - site: Site instance The template can be overridden by creating content/
/_index.md with custom content. #} {% from 'partials/navigation-components.html' import breadcrumbs, page_navigation, toc with context %} {% block content %} {# Three-column documentation layout #}
{# Left Sidebar: Navigation #} {# Main Content #}
{# Page Hero: Breadcrumbs + Title + Description #}
{# Breadcrumbs #} {% if page.href != '/' %} {% endif %} {# Title #}

{{ section.title if section else 'API Documentation' }}

{# Description #} {% set desc = section.metadata.get('description', '') if section else '' %} {% if desc %}
{{ desc | markdownify | safe }}
{% else %}

Browse all API documentation for this project.

{% endif %} {# Stats showing child count #} {% if section and section.sorted_subsections | length > 0 %} {% endif %}
{# Article Content - autodoc skeleton #}
{# Check if there's custom content from _index.md #} {% if content is defined and content and content.strip() %}
{{ content | safe }}
{% endif %} {# API Hub Card Grid #} {% if section and section.sorted_subsections %}
{% for subsection in section.sorted_subsections %} {% set sub_type = subsection.metadata.get('type', 'python-reference') %} {% set desc = subsection.metadata.get('description', '') | first_sentence %} {% set child_count = (subsection.subsections | length) + (subsection.pages | length) %}
{# Icon based on autodoc type #} {%- if 'python' in sub_type -%} {{ icon("code", size=32, css_class="icon-python") }} {%- elif 'openapi' in sub_type -%} {{ icon("globe", size=32, css_class="icon-openapi") }} {%- elif 'cli' in sub_type -%} {{ icon("terminal", size=32, css_class="icon-cli") }} {%- else -%} {{ icon("book", size=32, css_class="icon-default") }} {%- endif -%}

{{ subsection.title }}

{% if desc %} {{ desc }} {% else %} {# Default descriptions based on type #} {%- if 'python' in sub_type -%} Browse Python packages, modules, and classes. {%- elif 'openapi' in sub_type -%} Explore REST API endpoints and schemas. {%- elif 'cli' in sub_type -%} Command-line tools and options. {%- else -%} API documentation. {%- endif -%} {% endif %}

{% endfor %}
{% else %} {# Empty State #}
{{ icon("book-open", size=48, css_class="icon-muted") }}

No API documentation available yet.

Enable Python, OpenAPI, or CLI autodoc in your configuration.

{% endif %}
{# Page navigation (prev/next) at bottom #} {{ page_navigation(page) }}
{# Right Sidebar: Contextual Graph + TOC + Metadata #} {% include 'partials/docs-toc-sidebar.html' %}
{# Mobile sidebar toggle button #} {# Sidebar overlay for mobile #} {% endblock %}