{% assign site_logo = site.logo | relative_url %}

<header id="masthead">
  <div class="inner">
    <div class="title-area">
      {% if page.url == '/' %}
        <h1 class="site-title">
          <a href="{{ '/' | relative_url }}">
            {% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
            <span>{{ site.title | escape }}
              <h1 class="sub-title">
              {{ site.subtitle | escape }}</h1></span>
          </a>
        </h1>      
      {% else %}
        <h1 class="site-title">
          <a href="{{ '/' | relative_url }}">
            {% if site.logo %}<img src="{{ site_logo }}" alt="" class="site-logo">{% endif %}
            <span>{{ site.title | escape }}
              <h1 class="sub-title">
              {{ site.subtitle | escape }}</h1></span>  
          </a>
        </h1>
      {% endif %}
    </div>
  </div>
</header>
