<!DOCTYPE html>
<html>
  <head lang="{{ page.language }}">
    <meta charset="utf-8">
    <meta name="keywords" content="{% t 'site.keywords' %}">
    <meta name="description" content="{% t 'site.description' %}">
    <title>{% if page.title %}{{ page.title }}{% else %}{% t 'title' %}{% endif %} | {% t 'site.title' %}</title>
    <link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
    {% for language in page.languages %}
      {% if page.language != language %}
        <link rel="alternate" hreflang="{{ language }}" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace_first: page.language, language }}" />
      {% endif %}
    {% endfor %}
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="{{ site.baseurl }}/js/language-redirect.js" type="text/javascript"></script>
  </head>
  <body>
    {{ content }}
  </body>
</html>

<!DOCTYPE html>
<html>
  <head lang="{{ page.language }}">
    <meta charset="utf-8">
    <meta name="keywords" content="{% t 'site.keywords' %}">
    <meta name="description" content="{% t 'site.description' %}">
    <title>{% if page.title %}{{ page.title }}{% else %}{% t 'title' %}{% endif %} | {% t 'site.title' %}</title>
    <link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
    {% for language in page.languages %}
      <link rel="alternate" hreflang="{{ language }}" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace_first: page.language, language }}" />
    {% endfor %}
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="{{ site.baseurl }}/js/language-redirect.js" type="text/javascript"></script>
  </head>
  <body>
    {{ content }}
  </body>
</html>

Fix hreflang headers in the example
Issue25: Fix hreflang headers in the example

The example website's hreflang headers were ignored by Google and would not pass an hreflang test (e.g. https://technicalseo.com/seo-tools/hreflang/ ). This is simply because self-referencing headers are required but the sample had deliberately excluded them