Getting all pages + subpages

How would I go around getting all pages and subpages so I could make like a latest posts list but with all pages and subpages …

Have a look at the Pages Object, it allows access to all Grav pages and you can iterate over them to create the desired output.

Get the top-level pages for a simple menu (from the documentation):

<ul class="navigation">
    {% for page in pages.children %}
        {% if page.visible %}
            <li><a href="{{ page.url }}">{{ }}</a></li>
        {% endif %}
    {% endfor %}

Added collection to the pages header

    items: '@root.descendants'

and then added this to my template file

{% for post in page.collection.order('date', 'desc').slice(0, 5) %}
    <li class="recent-posts">
        <strong><a href="{{ post.url }}">{{ post.title }}</a></strong>
{% endfor %}