{% extends "base.html" %} {# API Reference Home Template Optimized home page template for API reference sites. Features: - No action bar (cleaner for home page) - Hero section with title and description - Main content area - Quick links to key API reference sections - No blog posts (API reference sites don't need recent posts) Usage: Set `type: autodoc-python` on home page to auto-select Or set `template: autodoc/python/home.html` in frontmatter #} {% block content %}
{# Hero Section #}

{{ page.title | default(site.title) }}

{% if params.description %}

{{ params.description }}

{% end %}
{# Main Content #} {% if content and content.strip() %}
{{ content | safe }}
{% end %} {# Quick Links to Key Sections #} {% set show_quick_links = params.show_quick_links ?? true %} {% if show_quick_links %} {# Find API reference sections #} {% set api_sections = [] %} {% for section in site.sections %} {% if section.metadata.type == 'autodoc-python' or section.metadata.content_type == 'autodoc-python' %} {% set _ = api_sections.append(section) %} {% end %} {% end %} {# If no autodoc-python sections found, try common section names #} {% if not api_sections %} {% set common_names = ['api', 'autodoc-python', 'api-docs', 'reference'] %} {% for name in common_names %} {% set candidates = site.sections | selectattr('name', 'equalto', name) | list %} {% if candidates %} {% set _ = api_sections.append(candidates[0]) %} {% end %} {% end %} {% end %} {% if api_sections %} {# Build sortable list with safe weight values #} {% set sortable_sections = [] %} {% for section in api_sections %} {% set _weight = section.metadata.weight %} {% set _ = sortable_sections.append({'section': section, 'weight': _weight or 999999}) %} {% end %}

{{ page.title ?? 'API Reference' }} Sections

{% end %} {% end %} {# Custom Quick Links from metadata #} {% set quick_links = params?.quick_links ?? [] %} {% if quick_links | length > 0 %} {% end %}
{% end %}