1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-30 18:24:35 +01:00

Fixed incorrectly set site url, if given

This commit is contained in:
squidfunk 2017-03-30 22:32:10 +02:00 committed by Martin Donath
parent 92d77fd896
commit 758f07cadc
2 changed files with 6 additions and 4 deletions

View File

@ -3,11 +3,11 @@
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
{% if config.extra.logo %}
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="md-logo md-header-nav__button">
<a href="{{ config.site_url | default(nav.homepage.url, true) }}" title="{{ config.site_name }}" class="md-logo md-header-nav__button">
<img src="{{ base_url }}/{{ config.extra.logo }}" width="24" height="24">
</a>
{% else %}
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="md-icon md-icon--home md-header-nav__button">
<a href="{{ config.site_url | default(nav.homepage.url, true) }}" title="{{ config.site_name }}" class="md-icon md-icon--home md-header-nav__button">
</a>
{% endif %}
</div>

View File

@ -30,13 +30,15 @@
<!-- Link to home -->
<div class="md-flex__cell md-flex__cell--shrink">
{% if config.extra.logo %}
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}"
<a href="{{ config.site_url | default(nav.homepage.url, true) }}"
title="{{ config.site_name }}"
class="md-logo md-header-nav__button">
<img src="{{ base_url }}/{{ config.extra.logo }}"
width="24" height="24" />
</a>
{% else %}
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}"
<a href="{{ config.site_url | default(nav.homepage.url, true) }}"
title="{{ config.site_name }}"
class="md-icon md-icon--home md-header-nav__button">
</a>
{% endif %}