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 }}">{{ page.menu }}</a></li>
{% endif %}
{% endfor %}
</ul>
---
Added collection to the pages header
content:
items: '@root.descendants'
and then added this to my template file
<ul>
{% for post in page.collection.order('date', 'desc').slice(0, 5) %}
<li class="recent-posts">
<strong><a href="{{ post.url }}">{{ post.title }}</a></strong>
<p>{{post.date|date}}</p>
</li>
{% endfor %}
</ul>
---