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

@ -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)

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 -%}

View file

@ -4,7 +4,7 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2019-01-23T19:35:45-05:00
last_modified_at: 2019-01-23T20:04:54-05:00
toc: true
---
@ -12,6 +12,7 @@ toc: true
### 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)