@@ 4,16 4,16 @@
<nav id="site-nav" class="greedy-nav">
<a class="site-title" href="{{ '/' | relative_url }}">{{ site.title }}</a>
<ul class="visible-links">
- {% for link in site.data.navigation.main %}
- {% if link.url contains 'http' %}
- {% assign domain = '' %}
- {% else %}
- {% assign domain = site.url | append: site.baseurl %}
- {% endif %}
+ {%- for link in site.data.navigation.main -%}
+ {%- if link.url contains '://' -%}
+ {%- assign url = link.url -%}
+ {%- else -%}
+ {%- assign url = link.url | relative_url -%}
+ {%- endif -%}
<li class="masthead__menu-item">
- <a href="{{ domain }}{{ link.url }}" {% if link.description %}title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
+ <a href="{{ url }}" {% if link.description %}title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
</li>
- {% endfor %}
+ {%- endfor -%}
</ul>
{% if site.search == true %}
<button class="search__toggle" type="button">
@@ 30,4 30,4 @@
</nav>
</div>
</div>
-</div>>
\ No newline at end of file
+</div>