{% extends "base.html" %} {# API Reference List Template Three-column layout optimized for API documentation section index pages: - Left sidebar: Navigation tree - Center: Content + Child page tiles - Right sidebar: Contextual Graph + TOC + metadata Usage: Set `template: autodoc/python/list.html` in frontmatter Or set `type: autodoc-python` to auto-select this template Features: - Page hero with overview variant (shows page count instead of read time) - Contextual graph minimap - Automatically displays child pages and subsections as tiles - Disable with `show_children: false` in frontmatter #} {% from 'partials/navigation-components.html' import breadcrumbs, page_navigation, toc %} {% from 'partials/components/tags.html' import tag_list %} {% from 'partials/components/tiles.html' import content_tiles %} {% block content %} {# Ensure page is set - use section.index_page if page not defined #} {# This is needed for breadcrumbs, sidebar navigation, and content rendering #} {% if not page and section %} {% set page = section.index_page %} {% end %} {# Three-column documentation layout #}
{# Left Sidebar: Navigation #} {# Main Content #}
{# Page Hero: Breadcrumbs + Title + Description + Section Stats #} {# List pages default to 'overview' variant (shows page count instead of read time) #} {% set _list_hero_default = 'overview' %} {% include 'partials/page-hero.html' %} {# Article Content - flattened structure #}
{{ content | safe }} {# Content tiles with smart defaults - use discover: frontmatter to customize #} {% set discover = params.discover if page else {} %} {% set children_config = discover.children if discover else {} %} {% set related_config = discover.related if discover else {} %} {% set children_disabled = children_config is sameas false %} {% set related_disabled = related_config is sameas false %} {% set show_children_feature = 'content.children' in theme.features %} {% set show_children = (not children_disabled) and show_children_feature %} {% set show_related = not related_disabled %} {% set children_title = children_config.title ?? 'In This Section' if children_config is mapping else 'In This Section' %} {% set children_variant = children_config.variant ?? 'compact' if children_config is mapping else 'compact' %} {% set related_title = related_config.title ?? 'Related Pages' if related_config is mapping else 'Related Pages' %} {% set related_limit = related_config.limit ?? 5 if related_config is mapping else 5 %} {% set children_title = none if children_title is sameas false else children_title %} {% set related_title = none if related_title is sameas false else related_title %} {% set has_children = posts or subsections %} {% set has_related = show_related and page and page.related_posts %} {% if show_children and (has_children or has_related) %}
{{ content_tiles( title=children_title if has_children else none, children=posts if show_children else none, subsections=subsections if show_children else none, related=page.related_posts[:related_limit] if has_related else none, related_title=related_title, variant=children_variant, group_by='type' if has_children and has_related else none, page=page ) }}
{% end %} {# Tags #} {% if page.tags %} {% end %}
{# 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 #} {% end %} {# Sidebar toggle functionality is handled by interactive.js #}