{% for item in include.sidebar %} {% assign prefix = item.path | slice: 0, 4 %} {% if prefix == "http" %} {% assign target=" target='_blank' " %} {% else %} {% assign target="" %} {% endif %} {% if item.path %} {% capture href %}{{ site.baseurl }}{{ item.path }}{% endcapture %} {% else %} {% capture href %}#{% endcapture %} {% endif %} {% capture link %} {{item.title}} {% endcapture %} {% if item.section %} {% capture titleized %}{{include.prefix}}-{{ item.title | downcase | replace: ' ','' | replace: ':','', | replace: '/','' | replace: '(', '-' | replace: ')', '' }}{% endcapture %}