{% assign urlParts = page.url | split: '/' %} {% assign activePlatform = urlParts[1] %} {% assign activeHub = urlParts[3] %} {% assign platform = site.data.routes.platforms | where: "href", activePlatform | first %} {% assign hub = platform.hubs | where: "href", activeHub | first %}

{{ hub.title }}

{{ hub.description }}

{% assign emptyItems = "" | split: "," %} {% assign hubArticles = hub.articles | default: emptyItems %} {% assign hubSections = hub.sections | default: emptyItems %} {% if hub.articles %} {% assign sortedSectionsAndArticles = hubSections | concat: hubArticles | sort: 'order' %} {% else %} {% assign sortedSectionsAndArticles = hubSections | sort: 'order' %} {% endif%}
{% for item in sortedSectionsAndArticles %} {% if item.articles or item.sections %} {% include section-card.html platform=activePlatform hub=hub.href section=item.href title=item.title %} {% else %} {% include article-card.html hub=hub.href href=item.href title=item.title platform=activePlatform %} {% endif %} {% endfor %}