{% capture css %}
  {% render "../../assets/styles/widgets/popular-posts.css" %}
{% endcapture %}
<style>{{ css }}</style>
{% assign posts = posts | getPopularPosts: analytics %}
<div class="popular-posts">
  <h2 class="flex--centered">
    {% tablericon "flame" "Popular" %}
    Popular posts
  </h2>
  <ul class="link__list">
    {% for post in posts limit: 5 %}
      <li>
        <a class="no-underline" href="{{post.url}}" title="{{ post.data.title | escape}}">
          {{ post.data.title }}
        </a>
      </li>
    {% endfor %}
  </ul>
</div>