Route home to the first/last page

Hi,

I am wondering if is possible to set the home to the first or last page in the content folder.
I am trying with this

return [
  'home' => page()->last()
]

But unfortunately it doesn’t work
Any suggestion?
Thanks
R.

This is currently not yet possible, because to be able to call kirby() or site(), you would need to set the home folder within the ready() option, which doesn’t work yet, but will be possible in 3.4 I think.

Thank you,
So if I want to show in home page the first/last page added what can I do?
R.

You could use a route and redirect to that page. Or you could load that page in your home template.

It will change continuously so I guess is not possible. My website is a portfolio where each gallery is a page and I want to show the last gallery in home.

I solved in this way.
Thank you