{%- if pagename != "search" %}
<form action="{{ pathto('search') }}" method="get" class="navbar-search-form">
  <i id="searchbar-icon" class="fa fa-search" aria-hidden="true"></i>
  <input type="text" id="navbar-search" name="q" class="form-control" placeholder="Search the docs">
</form>
{% else %}
<div class="navbar-search-form">
    <i id="searchbar-icon" class="fa fa-search" aria-hidden="true"></i>
    <input type="text" id="navbar-search" name="q" class="form-control" placeholder="Search the docs">
</div>
{%- endif %}