layout: default pagination:

enabled: true

<!– Page Header –> {% if page.background %}

<header class="masthead" style="background-image: url('{{ page.background | prepend: site.baseurl | replace: '//', '/' }}')">
{% else %}
  <header class="masthead">
  {% endif %}
  <div class="overlay"></div>
  <div class="container">
    <div class="row">
      <div class="col-lg-8 col-md-10 mx-auto">
        <div class="page-heading">
          <h1>{{ site.title }}</h1>
          {% if site.description %}
            <span class="subheading">{{ site.description }}</span>
          {% endif %}
        </div>
      </div>
    </div>
  </div>
</header>

<div class="container">
  <div class="row">
    <div class="col-lg-8 col-md-10 mx-auto">

      {{ content }}

      <!-- Home Post List -->
      {% for post in paginator.posts %}

        <article class="post-preview">
          <a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">
            <h2 class="post-title">{{ post.title }}</h2>
            {% if post.subtitle %}
              <h3 class="post-subtitle">{{ post.subtitle }}</h3>
            {% else %}
              <h3 class="post-subtitle">{{ post.excerpt | strip_html | truncatewords: 15 }}</h3>
            {% endif %}
          </a>
          <p class="post-meta">Posted by
            {% if post.author %}
              {{ post.author }}
            {% else %}
              {{ site.author }}
            {% endif %}
            on
            {{ post.date | date: '%B %d, %Y' }}</p>
        </article>

      {% endfor %}

      {% if paginator.total_pages > 1 %}

      <div class="clearfix">
        {% if paginator.total_pages > 1 %}
        <ul>
          {% if paginator.previous_page %}
          <li>
            <a href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
          </li>
          {% endif %}
          {% if paginator.next_page %}
          <li>
            <a href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
          </li>
          {% endif %}
        </ul>
        {% endif %}
      </div>
      {% endif %}

    </div>
  </div>
</div>