docs/_includes/top_nav_home.html
<nav class="navbar home navbar-expand-lg">
<div class="container">
<a class="navbar-brand" href="/">Secretless Broker</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span> </span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
{% assign links = site.data.navigation.main %}
{% for link in links %}
{% assign class = nil %}
{% if link.sublinks %}
<li class="dropdown top-sub {% if page.url contains link.section %}active{% endif %}">
<a href="{{ site.baseurl }}{{ link.url }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ link.title }} <span class="caret"></span></a>
<ul class="dropdown-menu arrow_box">
{% for sublink in link.sublinks %}
<li class="top-drop {% if page.url == sublink.url %}active{% endif %}">
<a href="{{ site.baseurl }}{{ sublink.url }}">{{ sublink.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="top-sub {% if page.url == link.url %}active{% endif %}">
<a href="{{ site.baseurl }}{{ link.url }}">{{ link.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</nav>