{% extends "base.html" %} {# CLI Reference Home Template Optimized home page template for CLI reference sites. Features: - No action bar (cleaner for home page) - Hero section with title and description - Main content area - Quick links to key CLI reference sections - No blog posts (CLI reference sites don't need recent posts) Usage: Set `type: autodoc-cli` on home page to auto-select Or set `template: autodoc/cli/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 CLI reference sections #} {% set cli_sections = [] %} {% for section in site.sections %} {% if section.metadata.type == 'autodoc-cli' or section.metadata.content_type == 'autodoc-cli' %} {% set _ = cli_sections.append(section) %} {% end %} {% end %} {# If no autodoc-cli sections found, try common section names #} {% if not cli_sections %} {% set common_names = ['cli', 'autodoc-cli', 'commands', 'command-line'] %} {% for name in common_names %} {% set candidates = site.sections | selectattr('name', 'equalto', name) | list %} {% if candidates %} {% set _ = cli_sections.append(candidates[0]) %} {% end %} {% end %} {% end %} {% if cli_sections %} {# Build sortable list with safe weight values #} {% set sortable_sections = [] %} {% for section in cli_sections %} {% set _weight = section.metadata.weight %} {% set _ = sortable_sections.append({'section': section, 'weight': _weight if _weight != none else 999999}) %} {% end %}

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

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