Using the method "createWebPage" in the class "Site", I know I could create a page using Apps Scripts. What I want to do is creating subpages to the first page. Using the structure below as an example:
How do I go about creating this? Anyone who's done something like this, please show me how to get started. Thanks!
Yes, the Page class also has a createWebPage method to allow pages to create pages as children (subpages). So your code would look something like this:
//...get a site first and then
var animalPage = mySite.createWebPage("title", "name", "some html");
var dogPage = animalPage.createWebPage("title", "name", "some html");
var shihtzuPage = dogPage.createWebPage("title", "name", "some html");
Let us know how you go.