{% 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: cli-reference` on home page to auto-select Or set `template: cli-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 CLI reference sections #} {% set cli_sections = [] %} {% for section in site.sections %} {% if section.metadata.get('type') == 'cli-reference' or section.metadata.get('content_type') == 'cli-reference' %} {% set _ = cli_sections.append(section) %} {% endif %} {% endfor %} {# If no cli-reference sections found, try common section names #} {% if not cli_sections %} {% set common_names = ['cli', 'cli-reference', '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]) %} {% endif %} {% endfor %} {% endif %} {% if cli_sections %}

CLI Reference Sections

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