{
  "nav": [
    {
      "link": "/",
      "title": "Index"
    },
    {
      "link": "/docs",
      "title": "Docs",
      "children": [
        {
          "link": "/docs/installation",
          "title": "Installation",
          "children": [
            {
              "link": "/docs/installation/quickstart",
              "title": "Quickstart"
            },
            {
              "link": "/docs/installation/advanced",
              "title": "Advanced"
            }
          ]
        },
        {
          "link": "/docs/faq",
          "title": "FAQ"
        }
      ]
    }
  ]
}
---
<ul class="nav">
{% for item in nav recursive %}
  {% set parent = loop %}
  {% for color in ['blue', 'red'] %}
    <li class={{ color }}><a href={{ item.link }}">{{ item.title }}</a>{%
      if item.children %}<ul>{{ parent(item.children) }}</ul>{% endif %}</li>
  {% endfor %}
{% endfor %}
</ul>
