How can i invert posts under pages

So i make blog posts under user/pages but they are upside down, the latest post is at the bottom and the oldest post is at the top being the first thing to read. I want the latest to be at the top.

@valkoh, Would you mind providing a bit more information?

So i make blog posts […]

  • If using Admin, which theme are you using?
  • If using an IDE, how does the collection definition look like in blog.md?

quark theme, with only color and such small adjustments which make it a custom? I only have the very basic stuff in the file of each post. I am looking for a way to invert the whole direction of the posts ive made into the pages/02.blog folder. As i said, the latest seems like its the oldest one, and the oldest one seems like the most recent. The posts all have the same name except for the last character being a number that is bigger than the last one. eg, 000001->000002. This is what i want to invert. I have 00001 00002 00003 00004 00005 00006. I want 00006 to appear first on the page, 00001 as the last.

@valkoh, You didn’t say, but I presume you’ve been using Admin.

  • Open the blog page in Admin
  • Select tab “Blog Config”,
  • Scroll down to section “Content Definition”
  • What values does field “Order by” and “Order” have?
    • Try “Order by”: folder or default, with “Order”: descending.

By the way, why are you using numbers for the blog item folders? For the purpose of ordering only?

Not knowing your use-case, I would think that, when using Admin, creating a blog item using the default foldername (based on the title of the blog item) would be easier. You wouldn’t need to know the latest folder number. In tab ‘Option’ you can then set a ‘date’ on which the blog-items can be ordered.

Also, when working in a terminal, it would be easier if folders have descriptive name of its content, instead of numbers.

No i am not using the Admin GUI, did not even know what you meant by saying “Admin”, just wanted to know if this was possible by a simple change somewhere.
Btw using words “grav blog invert” does not bring anything up from google to help with this. I guess its just such a basic thing to know… Anyways, found the answer from chapter 2 of the learning page.

order:
        dir: desc

Added it onto the blog.md file and its now all nicely inverted.