{% extends "base.html" %}

{% block body_class %}template-blog-index{% endblock %}

{% load wagtailcore_tags %}

{% block content %}
  <section class="white-section">
    <div class="section-content">
      <div class="blog-post-list">
        {% for post in page.posts %}
        <div class="blog-post-item">
          <h2 class="blog-title">{{ post.title }}</h2>
          <h5 class="blog-byline">{{ post.byline }} &middot; {{ post.date }}</h5>
          <p class="blog-intro">{{ post.preview }}</p>
          <a href="{{ post.url }}">
            <div class="button button-light" aria-role="button">read more<i class="fa fa-chevron-right" aria-hidden="true"></i></div>
          </a>
        </div>
        {% endfor %}
      </div>
    </div>
  </section>
{% endblock %}

{% extends "base.html" %}

{% block body_class %}template-blog-index{% endblock %}

{% load wagtailcore_tags %}

{% block content %}
  <section class="white-section">
    <div class="section-content">
      {% if not page.posts %}
        <p>No blog posts have been published yet!</p>
      {% endif %}
      <div class="blog-post-list">
        {% for post in page.posts %}
        <div class="blog-post-item">
          <h2 class="blog-title">{{ post.title }}</h2>
          <h5 class="blog-byline">{{ post.byline }} &middot; {{ post.date }}</h5>
          <p class="blog-intro">{{ post.preview }}</p>
          <a href="{{ post.url }}">
            <div class="button button-light" aria-role="button">read more<i class="fa fa-chevron-right" aria-hidden="true"></i></div>
          </a>
        </div>
        {% endfor %}
      </div>
    </div>
  </section>
{% endblock %}

Add explanation to blog index page if no posts have been published
Add explanation to blog index page if no posts have been published
