Sha256: 4d5f0d9f23c8bac02da0eee6c5d1f21ff664131f7ed411fd58e40d897e4c3b95
Contents?: true
Size: 1.06 KB
Versions: 4
Compression:
Stored size: 1.06 KB
Contents
<nav id="sidebar-nav"> <a class="{% if page.url == '/' %} active{% endif %}" href="{{ site.baseurl }}/">Home</a> {% comment %} The code below dynamically generates a sidebar nav of pages with `sidebar_link: true` in the front-matter. See readme for usage. {% endcomment %} {% assign pages_list = site.pages %} {% for node in pages_list %} {% if node.title != null %} {% if node.sidebar_link %} <a class="{% if page.url == node.url %} active{% endif %}" href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a> {% endif %} {% endif %} {% endfor %} {% comment %} Now do it again, but for category pages {% endcomment %} {% for node in pages_list %} {% if node.title != null %} {% if node.layout == "category" %} <a class="{% if page.url == node.url %} active{% endif %}" href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a> {% endif %} {% endif %} {% endfor %} {% if site.version %} <span>Currently v{{ site.version }}</span> {% endif %} </nav>
Version data entries
4 entries across 4 versions & 1 rubygems