I have too many pages and want to sort them by folder within the site pages section of site contents
There does not seems to be an out of the box way to do it. However you can do it programatically. Below is the snippet to do it in CSOM, you can change it into JSOM or Rest API and use it accordingly.
string siteUrl = "http://mycomapny.sharepoint.com/sites/site1"; ClientContext clientContext = new ClientContext(siteUrl); //Folder Creation List list = clientContext.Web.Lists.GetByTitle("Site Pages"); var folder = list.RootFolder; clientContext.Load(folder); Folder fld1 = folder.Folders.Add("My Folder1"); clientContext.ExecuteQuery();
Hope that helps..!!