<div class="posts card mb-4">
  <div class="card-block">
    <h4 class="card-title list-title">Recent Posts</h4>
    {% assign posts = site.posts | sort: 'position' %}
    <ul class="list-group list-group-flush">
      {% for post in posts limit: 5 %}
        <li class="list-group-item">
          <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
        </li>
      {% endfor %}
    </ul>
  </div>
</div>

<div class="posts card mb-4">
  <div class="card-block">
    <h4 class="card-title list-title">Recent Posts</h4>
    {% assign sorted_posts = site.posts | sort: 'date' | reverse %}
    <ul class="list-group list-group-flush">
      {% for post in sorted_posts limit: 5 %}
        <li class="list-group-item">
          <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
        </li>
      {% endfor %}
    </ul>
  </div>
</div>

Sort recent posts by date desc
Sort recent posts by date desc
