I want to create pages by reading options from a config file
Reading the documentation I understand that in order to create a multi page app I have to add all my pages under a /pages folder which will be read from the main page. In the app I am trying to build I don’t know the pages beforehand and I need to read some options from a config file in order to know the name and the number of pages I should create.
The way I do it now is by reading the config file and creating the .py on the spot using Pathlib,
for page in conf['pages]:
Path(f'pages/{page}.py').touch()
I was wondering if there is a better way to do this?