Fix site.logo false positives

This commit is contained in:
Michael Rose
2019-01-23 20:05:17 -05:00
parent f405d24ce2
commit d41a284bd2
3 changed files with 7 additions and 3 deletions

View File

@ -1,14 +1,16 @@
{% if site.logo contains "://" %}
{% capture logo_path %}{{ site.logo }}{% endcapture %}
{% else %}
{% capture logo_path %}{{ site.logo | relative_url }}{% endcapture %}
{% capture logo_path %}{{ site.logo }}{% endcapture %}
{% endif %}
<div class="masthead">
<div class="masthead__inner-wrap">
<div class="masthead__menu">
<nav id="site-nav" class="greedy-nav">
{% if site.logo %}<a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path }}" alt=""></a>{% endif %}
{% unless logo_path == empty %}
<a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt=""></a>
{% endunless %}
<a class="site-title" href="{{ '/' | relative_url }}">{{ site.masthead_title | default: site.title }}</a>
<ul class="visible-links">
{%- for link in site.data.navigation.main -%}