1. Home
  2. Liquid
  3. Get posts

Get a collection of all posts and display the title and the url in a list format.

#liquid#posts
<ul>
    {% for post in site.posts %}
    <li>
        <a href="{{ post.url }}">{{ post.title }}</a>
    </li>
    {% endfor %}
</ul>
copy
Full Liquid cheatsheet