{% comment %} Related documentation links for internal linking SEO Shows
contextual "next steps" based on current page {% endcomment %} {% if page.url
contains '/docs/' %}
<aside class="related-docs" aria-label="Related documentation">
  <h2 class="related-docs-title">Continue Reading</h2>

  <div class="related-docs-grid">
    {% if page.url contains '/comparisons/' %}
    <a
      href="{{ '/features/web-ui/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🧭</span>
      <span class="related-docs-label">Web Workspace</span>
      <span class="related-docs-desc"
        >See browse tree, graph, and editing together</span
      >
    </a>
    <a
      href="{{ '/docs/QUICKSTART/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🚀</span>
      <span class="related-docs-label">Quick Start</span>
      <span class="related-docs-desc"
        >Try GNO on your own files in minutes</span
      >
    </a>
    {% elsif page.url contains 'QUICKSTART' %}
    <a href="{{ '/docs/CLI/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">📖</span>
      <span class="related-docs-label">CLI Reference</span>
      <span class="related-docs-desc">All commands and options</span>
    </a>
    <a
      href="{{ '/docs/CONFIGURATION/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">⚙️</span>
      <span class="related-docs-label">Configuration</span>
      <span class="related-docs-desc">Customize collections and models</span>
    </a>
    {% elsif page.url contains 'INSTALLATION' %}
    <a
      href="{{ '/docs/QUICKSTART/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🚀</span>
      <span class="related-docs-label">Quick Start</span>
      <span class="related-docs-desc">Get searching in 5 minutes</span>
    </a>
    <a
      href="{{ '/docs/TROUBLESHOOTING/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🔧</span>
      <span class="related-docs-label">Troubleshooting</span>
      <span class="related-docs-desc">Fix common issues</span>
    </a>
    {% elsif page.url contains 'CLI' %}
    <a href="{{ '/docs/MCP/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">🌐</span>
      <span class="related-docs-label">MCP Integration</span>
      <span class="related-docs-desc">Connect to AI assistants</span>
    </a>
    <a
      href="{{ '/docs/FINE-TUNED-MODELS/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🧪</span>
      <span class="related-docs-label">Fine-Tuned Models</span>
      <span class="related-docs-desc">Use custom GGUF retrieval models</span>
    </a>
    {% elsif page.url contains 'FINE-TUNED-MODELS' %}
    <a
      href="{{ '/docs/CONFIGURATION/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">⚙️</span>
      <span class="related-docs-label">Configuration</span>
      <span class="related-docs-desc">Wire custom presets and model URIs</span>
    </a>
    <a href="{{ '/docs/USE-CASES/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">💡</span>
      <span class="related-docs-label">Use Cases</span>
      <span class="related-docs-desc">Real-world retrieval workflows</span>
    </a>
    {% elsif page.url contains 'MCP' %}
    <a href="{{ '/docs/CLI/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">📖</span>
      <span class="related-docs-label">CLI Reference</span>
      <span class="related-docs-desc">All commands and options</span>
    </a>
    <a
      href="{{ '/docs/ARCHITECTURE/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🏗️</span>
      <span class="related-docs-label">Architecture</span>
      <span class="related-docs-desc">How GNO works</span>
    </a>
    {% elsif page.url contains 'CONFIGURATION' %}
    <a
      href="{{ '/docs/guides/per-collection-models/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🗂️</span>
      <span class="related-docs-label">Per-Collection Models</span>
      <span class="related-docs-desc"
        >Override one collection without changing the workspace</span
      >
    </a>
    <a
      href="{{ '/docs/guides/bring-your-own-models/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🧩</span>
      <span class="related-docs-label">Bring Your Own Models</span>
      <span class="related-docs-desc"
        >Use custom GGUFs and remote model servers</span
      >
    </a>
    {% elsif page.url contains '/guides/code-embeddings/' %}
    <a
      href="{{ '/docs/guides/per-collection-models/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🗂️</span>
      <span class="related-docs-label">Per-Collection Models</span>
      <span class="related-docs-desc"
        >Inheritance, UI, CLI, and API overrides</span
      >
    </a>
    <a
      href="{{ '/features/benchmarks/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">📊</span>
      <span class="related-docs-label">Benchmarks</span>
      <span class="related-docs-desc">See why Qwen became the default</span>
    </a>
    {% elsif page.url contains '/guides/per-collection-models/' %}
    <a
      href="{{ '/docs/guides/bring-your-own-models/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🧩</span>
      <span class="related-docs-label">Bring Your Own Models</span>
      <span class="related-docs-desc"
        >Use local GGUFs or remote HTTP endpoints</span
      >
    </a>
    <a
      href="{{ '/docs/guides/code-embeddings/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">💻</span>
      <span class="related-docs-label">Code Embeddings</span>
      <span class="related-docs-desc"
        >Tune code collections without touching prose</span
      >
    </a>
    {% elsif page.url contains '/guides/bring-your-own-models/' %}
    <a
      href="{{ '/docs/guides/per-collection-models/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🗂️</span>
      <span class="related-docs-label">Per-Collection Models</span>
      <span class="related-docs-desc"
        >Apply custom models to one collection only</span
      >
    </a>
    <a
      href="{{ '/features/local-llm/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🧠</span>
      <span class="related-docs-label">Local LLM Answers</span>
      <span class="related-docs-desc"
        >Run local or remote answer models with citations</span
      >
    </a>
    {% elsif page.url contains 'ARCHITECTURE' %}
    <a href="{{ '/docs/GLOSSARY/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">📚</span>
      <span class="related-docs-label">Glossary</span>
      <span class="related-docs-desc">Key terms explained</span>
    </a>
    <a href="{{ '/docs/MCP/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">🌐</span>
      <span class="related-docs-label">MCP Integration</span>
      <span class="related-docs-desc">Connect to AI assistants</span>
    </a>
    {% elsif page.url contains 'USE-CASES' %}
    <a href="{{ '/docs/CLI/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">📖</span>
      <span class="related-docs-label">CLI Reference</span>
      <span class="related-docs-desc">All commands and options</span>
    </a>
    <a href="{{ '/docs/MCP/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">🌐</span>
      <span class="related-docs-label">MCP Integration</span>
      <span class="related-docs-desc">Connect to AI assistants</span>
    </a>
    {% elsif page.url contains 'TROUBLESHOOTING' %}
    <a
      href="{{ '/docs/INSTALLATION/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">📥</span>
      <span class="related-docs-label">Installation</span>
      <span class="related-docs-desc">Setup instructions</span>
    </a>
    <a
      href="{{ '/docs/CONFIGURATION/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">⚙️</span>
      <span class="related-docs-label">Configuration</span>
      <span class="related-docs-desc">Customize GNO</span>
    </a>
    {% elsif page.url contains 'GLOSSARY' %}
    <a
      href="{{ '/docs/ARCHITECTURE/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🏗️</span>
      <span class="related-docs-label">Architecture</span>
      <span class="related-docs-desc">How GNO works</span>
    </a>
    <a
      href="{{ '/docs/QUICKSTART/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🚀</span>
      <span class="related-docs-label">Quick Start</span>
      <span class="related-docs-desc">Get started now</span>
    </a>
    {% else %}
    <a
      href="{{ '/docs/QUICKSTART/' | relative_url }}"
      class="related-docs-card"
    >
      <span class="related-docs-icon">🚀</span>
      <span class="related-docs-label">Quick Start</span>
      <span class="related-docs-desc">Get searching in 5 minutes</span>
    </a>
    <a href="{{ '/docs/CLI/' | relative_url }}" class="related-docs-card">
      <span class="related-docs-icon">📖</span>
      <span class="related-docs-label">CLI Reference</span>
      <span class="related-docs-desc">All commands and options</span>
    </a>
    {% endif %}
  </div>
</aside>
{% endif %}
