feat: Add page descriptions to table of contents with inline styling

This commit is contained in:
Paul Gauthier (aider) 2025-03-21 13:29:22 -07:00
parent 29db4231ee
commit 36f2458f2e

View file

@ -14,6 +14,10 @@ Aider is AI pair programming in your terminal. This documentation will help you
{% if page.title and page.url != "/" and page.parent == nil and page.nav_exclude != true %}
<li>
<a href="{{ page.url | absolute_url }}">{{ page.title }}</a>
{% if page.description %}
<br>
<span style="margin-left: 1em; font-size: 0.9em; font-style: italic;">{{ page.description }}</span>
{% endif %}
{% assign children = site.html_pages | where: "parent", page.title | sort: "nav_order" %}
{% if children.size > 0 %}
@ -22,6 +26,10 @@ Aider is AI pair programming in your terminal. This documentation will help you
{% if child.title %}
<li>
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>
{% if child.description %}
<br>
<span style="margin-left: 1em; font-size: 0.9em; font-style: italic;">{{ child.description }}</span>
{% endif %}
{% assign grandchildren = site.html_pages | where: "parent", child.title | sort: "nav_order" %}
{% if grandchildren.size > 0 %}
@ -30,6 +38,10 @@ Aider is AI pair programming in your terminal. This documentation will help you
{% if grandchild.title %}
<li>
<a href="{{ grandchild.url | absolute_url }}">{{ grandchild.title }}</a>
{% if grandchild.description %}
<br>
<span style="margin-left: 1em; font-size: 0.9em; font-style: italic;">{{ grandchild.description }}</span>
{% endif %}
</li>
{% endif %}
{% endfor %}