Defining new pages dynamically from data in a a folder

Loving observable so far, lot of great features, and easy to develop in.

I have a service running in the background which pulls .yaml files from an api. These files are saved locally. I would like for observable to listen to the folder these files are in and create pages dynamically from these data files.So foo.yaml would create a page at /foo.
Is this possible with observable?

I have tried for a little while now, i understand the concept of using files such as [file].md, and using data loaders, aswell as dynamically naming pages in observablehq.config.js.

However, i cant really seem to glue it all together, and i often stumble upon errors such as Protocol error Error: not found /pages/test.

I have had success making one page dynamically update based on new file data, so i hope this would also be possible.
So in short, i have a background service fetching new yaml files, i would like those yaml files to load into template .md files and display their data as new pages i can route to dynamically.

Thanks in advance for any advice.

Please see 📣 Support for Plot, D3 and Framework has moved to GitHub