Sha256: 89e5284d7b5d5a111f2778dbf05f905ef163663b715a3e16988fbc51fd9fe975
Contents?: true
Size: 1.19 KB
Versions: 6
Compression:
Stored size: 1.19 KB
Contents
{% comment %} This is a function to turn YML sidebar definitions into HTML lists. Based on tip in http://hamishwillee.github.io/2014/11/13/jekyll-includes-are-functions/ {% endcomment %} {% if include.item.contents %} {% assign currentLevel = include.level | plus: 0 %} {% assign nextLevel = include.level | plus: 1 %} {% if currentLevel < 10 %} <li> <a href="#">{{ include.item.title }}</a> <ul> {% for subitem in include.item.contents %} {% include /functions/recursive_item_to_list.html item=subitem level=nextLevel %} {% endfor %} </ul> </li> {% endif %} {% comment %}if currentLevel < 10 {% endcomment %} {% else %} {% assign item_url_stripped = (include.item.url | remove: "index.html" %} {% if include.item.url contains "http://" %} <li><a href="{{include.item.url}}" target="_blank">{{include.item.title}}</a></li> {% elsif page.url == item_url_stripped %} <li class="active"><a href="{{include.item.url | prepend: site.baseurl}}">{{include.item.title}}</a></li> {% else %} <li><a href="{{include.item.url | prepend: site.baseurl}}">{{include.item.title}}</a></li> {% endif %} {% endif %}
Version data entries
6 entries across 6 versions & 1 rubygems