Is there a Kirby method to create a new page via PHP? For example, if I have an object:
$newPage = [
'title' => 'Hello World',
'author' => 'Guy',
'summary' => 'Lorem Ipsum'
];
I’d like to get:
title: Hello World
----
author: Guy
----
summary: Lorem Ipsum
I could do a loop, but I’m thinking that could get tricky if I have objects/arrays etc.
Edit:
There’s $page->update()
which seems to do what I need for updating an existing page, but I can’t find a $page->save()
for one that doesn’t exist.