hacks-guide-minimal-mistake.../_includes/_navigation.html
Michael Rose f4869f79c4 Use data file to maintain site navigation
- Remove top navigation links from _config.yml
2014-07-31 14:56:58 -04:00

19 lines
No EOL
691 B
HTML

<div class="navigation-wrapper">
<div class="site-name">
<a href="{{ site.url }}">{{ site.title }}</a>
</div><!-- /.site-name -->
<div class="top-navigation">
<nav role="navigation" id="site-nav" class="nav">
<ul>
{% for link in site.data.navigation %}
{% if link.url contains 'http' %}
{% assign domain = '' %}
{% else %}
{% assign domain = site.url %}
{% endif %}
<li><a href="{{ domain }}{{ link.url }}" {% if link.url contains 'http' %}target="_blank"{% endif %}>{{ link.title }}</a></li>
{% endfor %}
</ul>
</nav>
</div><!-- /.top-navigation -->
</div><!-- /.navigation-wrapper -->