A new Siteleaf is here, upgrade to v2 →

Siteleaf

Menu

Sort page/post assets by filename

Siteleaf v1 Docs » Theme Documentation » Tips and tricks » Sort page/post assets by filename
{% assign sorted_assets = assets.all | sort:'filename' %}
<ol>
  {% for asset in sorted_assets %}
    <li>{{asset.url}}</li>
  {% endfor %}
</ol>