{% 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: api-reference` on home page to auto-select Or set `template: api-reference/home.html` in frontmatter #} {% block content %}
{# Hero Section #}

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

{% if page.metadata.get('description', '') %}

{{ page.metadata.get('description', '') }}

{% endif %}
{# Main Content #} {% if content and content.strip() %}
{{ content | safe }}
{% endif %} {# Quick Links to Key Sections #} {% set show_quick_links = page.metadata.get('show_quick_links', true) %} {% if show_quick_links %} {# Find API reference sections #} {% set api_sections = [] %} {% for section in site.sections %} {% if section.metadata.get('type') == 'api-reference' or section.metadata.get('content_type') == 'api-reference' %} {% set _ = api_sections.append(section) %} {% endif %} {% endfor %} {# If no api-reference sections found, try common section names #} {% if not api_sections %} {% set common_names = ['api', 'api-reference', '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]) %} {% endif %} {% endfor %} {% endif %} {% if api_sections %}

API Reference Sections

{% endif %} {% endif %} {# Custom Quick Links from metadata #} {% if page.metadata.get('quick_links') %} {% endif %}
{% endblock %}