Get frontmatter field from every post in blog?

Hi! I’m wondering if it is possible to get a frontmatter field from every page or blog post and insert each one into an array?

For example, in every blog post I have a frontmatter key image; I’d like to grab this key from every single post and insert them all into a single array.

Thanks!

Sorry to answer my own question immediately after asking it but I figured out a solution!

<% images = [] %>
<% for article in blog.articles do %>
    <% images.push(article.data.image) %>
<% end %>
 <% images.push(article.data.image) %>
1 Like