_includes/nav-default.html in alembic-jekyll-theme-2.0.3 vs _includes/nav-default.html in alembic-jekyll-theme-2.1.0
- old
+ new
@@ -1,14 +1,21 @@
<nav class="nav">
<ul class="list list--nav">
{% for item in site.pages %}
{% unless item.title == false or item.url contains "/page" or item.url contains "/404.html" or item.url contains "/feed." or item.url contains ".json" %}
<li class="item item--nav{% if item.url == page.url %} item--current{% endif %}">
+
+ {% if item.url contains '://' %}
+ {% assign url = item.url %}
+ {% else %}
+ {% assign url = item.url | relative_url %}
+ {% endif %}
+
{% if item.collectionpage %}
{% assign collectiondata = site.collections | where: "label", item.collectionpage | first %}
- <a href="{{ item.url }}" title="Page - {{ collectiondata.title }}">{{ collectiondata.title }}</a>
+ <a href="{{ url }}" title="Page - {{ collectiondata.title }}">{{ collectiondata.title }}</a>
{% else %}
- <a href="{{ item.url }}" title="Page - {{ item.title }}">{{ item.title }}</a>
+ <a href="{{ url }}" title="Page - {{ item.title }}">{{ item.title }}</a>
{% endif %}
</li>
{% endunless %}
{% endfor %}
</ul>