{% capture webmention_types %}{{ types | join: ',' }}{% endcapture %} <div class=“webmentions”{% unless webmention_types==“” %} data-webmention-types=“{{ webmention_types }}”{% endunless %}>

{% if webmentions.size > 0 %}
  <ol class="webmentions__list">
    {% for webmention in webmentions %}
      <li id="webmention-{{ webmention.id }}" class="webmentions__item">
        <article class="h-cite webmention webmention--{{ webmention.type }}
          {% unless webmention.author %}webmention--no-author{% endunless %}
          {% unless webmention.author.photo %}webmention--no-photo{% endunless %}
          {% if webmention.source=='twitter' %}{% if webmention.type=='like' or webmention.type=='repost' %}webmention--author-starts{% endif %}{% endif %}
          ">
          {% if webmention.author %}
            <div class="webmention__author p-author h-card">
              <a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">
                {% if webmention.author.photo %}
                  <img class="webmention__author__photo u-photo" src="{{ webmention.author.photo }}" alt="" title="{{ webmention.author.name }}">
                {% endif %}
                <b class="p-name">{{ webmention.author.name }}</b>
              </a>
            </div>
          {% endif %}

          <div class="webmention__content p-content">
            {% if webmention.content %}
              {{ webmention.content }}
            {% else %}
              {{ webmention.title }}
            {% endif %}
          </div>

          <div class="webmention__meta">
            {% if webmention.pubdate %}
              <time class="webmention__pubdate dt-published"
                    datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
            {% endif %}
            {% if webmention.pubdate and webmention.url %}|{% endif %}
            {% if webmention.url %}
              <a class="webmention__source u-url" href="{{ webmention.url }}" rel="nofollow">Permalink</a>
            {% endif %}
          </div>
        </article>
      </li>
    {% endfor %}
  </ol>
{% else %}
  <p class="webmentions__not-found">No webmentions were found.</p>
{% endif %}

</div>