jekyll/_includes/sidebar.html (22 lines of code) (raw):

<div id="sidebar" class="sidebar"> {% assign sorted_collections = site.collections | sort: "position_number" %} {% for collection in sorted_collections %} {% if collection.label != "posts" %} <section> <h6>{{ collection.title }}</h6> <ul> {% assign sorted_docs = collection.docs | sort: "position_number" %} {% for doc in sorted_docs %} <li> <a href="{% if page.url != '/' %}/{% endif %}#{{ doc.id | replace: '/', '' | replace: '.', '' }}" class="nav-item" data-doc-id="{{ doc.id | replace: '/', '' | replace: '.', '' }}"> {{ doc.title }} {% if doc.type %}<span class="endpoint {{ doc.type }}"></span>{% endif %} </a> </li> {% endfor %} </ul> </section> {% endif %} {% endfor %} </div>