{% if logo %}
{% if not theme_logo_link %}
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
  <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
</a>
{% elif theme_logo_link[:4] == 'http' %}
<a class="navbar-brand" href="{{ theme_logo_link }}">
  <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
</a>
{% else %}
<a class="navbar-brand" href="{{ pathto(theme_logo_link) }}">
  <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
</a>      
{% endif %}
{% else %}
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
<p class="title">{{ project }}</p>
</a>
{% endif %}