{% assign section = page.id | split: “/” | shift | first %} {% assign sdata = site.data %} {% if sdata.docs %}

<div class=“{{ include.class }} pb-4”>

<div class="list-group shadow mr-4">
{% for h in sdata.docs %}
  {% if sdata.doc %}
    {% assign shome = sdata.doc %}
  {% else %}
    {% assign shome = "index" %}
  {% endif %}

  {% assign sdocs = shome | concat: h.pages %}
  {% for item in sdocs %}

    {% assign sid = section | prepend:"/" | append:"/" | append:item %}
    {% assign doc = site.docs | where:"id", sid | first %}

    {% assign istyle = "" %}
    {% if forloop.first %}
      {% assign istyle = istyle | append:" font-weight-bold" %}
    {% endif %}

    {% if doc.id == page.id %}
      {% assign istyle = istyle | append:" active" %}
    {% else %}
      {% if forloop.first %}
        {% assign istyle = istyle | append:" list-group-item-primary" %}
      {% endif %}
    {% endif %}

    <a class="list-group-item list-group-item-action bs-callout bs-callout-blue{{ istyle }}" href="{{ doc.url  | prepend: site.baseurl }}">
      {{ doc.title }}
      {% if doc.badge %}
      <span class="badge badge-light float-right">{{ doc.badge }}</span>
      {% endif %}
    </a>
  {% endfor %}
{% endfor %}
</div>

</div> {% endif %}