So, I am slowly getting an idea about how this CMS works. One thing that puzzles me is the amount of subdirs I have to create.
Would it be possible to have a more “flat” structure, something like
1-projecta.txt // so I don't have to create subdirs if I
2-projectb.txt // don't need any subpages under ?
This example of course taken to the extreme, a site could have one “home.txt” and “n” other files in same dir, with numbers.
Or, is the creation of a dir/file structure technically needed ?
Kirby’s file structure means that your folder name is your URL slug, and your text filename is the template.
In the example above, you’re defining three different template files for
projectc. The lack of folder structure means there’s no distinction between page slug and template.
You can’t have multiple content files in one folder (apart from files for different languages and meta files for images), a folder is required for each page/content file. As @samnabi has explained above, the folder name is used for the URL slug; so Kirby just reads one file, all other files would be ignored.
Edit: Also, the way Kirby is set up, all the methods depend on this structure. For example, each folder can take images or other files that belong the that particular page, which you can then call in your templates with
$page->images(), which would not be possible with the structure you suggested. That would require a whole new CMS.