<article class=“post-card post{% unless post.feature_image %} no-image{% endunless %}”>

{% if post.feature_image %}
  <a class="post-card-image-link" href="{{ post.url | relative_url }}">
    <div class="post-card-image" style="background-image: url({{ post.feature_image }})"></div>
  </a>
{% endif %}

<div class="post-card-content">
  <a class="post-card-content-link" href="{{ post.url | relative_url }}">
    <header class="post-card-header">
      {% unless post.tags.count.zero? %}
        <span class="post-card-tags">{{ post.tags.first }}</span>
      {% endunless %}

      <h2 class="post-card-title">{{ post.title }}</h2>
    </header>

    <section class="post-card-excerpt">
      <p>{{ post.excerpt | default: post.content | strip_html | normalize_whitespace | truncatewords: 33 | escape }}</p>
    </section>
  </a>

  <footer class="post-card-meta">
    {% if site.author.profile_image %}
      <img class="author-profile-image" src="{{author.profile_image}}" alt="{{site.author.name}}" />
    {% endif %}
    <span class="post-card-author">{{ site.author.name }}</span>
  </footer>
</div>

</article>