M CHANGELOG.md => CHANGELOG.md +1 -0
@@ 2,6 2,7 @@
### Bug Fixes
+- Fix `site.logo` false positives. [#2026](https://github.com/mmistakes/minimal-mistakes/pull/2026#issuecomment-455770730)
- Add empty `alt` attribute to `site.logo` image. [#2035](https://github.com/mmistakes/minimal-mistakes/pull/2035)
## [4.15.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.15.1)
M _includes/masthead.html => _includes/masthead.html +4 -2
@@ 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 -%}