-
Hi! loving Observable Framework so far! It feels good to work with. My problem: Is it possible for Observable to watch this directory and generate pages as new files arrive? I have explored [file].md routes, FileAttachment, and the discussion in 855 That works well if I know the filenames at build time, but in my case, files arrive dynamically while the dev server is running, and I dont want to restart/build it every time. I’ve managed to build one dynamic page that updates its content when files change (which was cool!!), but I would like to generate new routes automatically as files are added. I can see one solution where i have say 5 files whos names are static, and then i update their contents with new .yaml messages. However this would limit me to only 5 data files (and therefore 5 pages) at a time (if i have understood the problem correctly). Thanks in advance for any advice. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you using the However when I run it in dev, it's only getting the list once. Note that Framework is meant to be used to build static sites, and the dev server is only here to help you iterate on and preview the contents and code. If you need to poll values (or a file server) live, you would need to do it in client-side javascript. hope this helps |
Beta Was this translation helpful? Give feedback.
Are you using the
dynamicPaths
option? In my site (pangea) I'm building a list of videos that each get converted to a page, however many they are.However when I run it in dev, it's only getting the list once. Note that Framework is meant to be used to build static sites, and the dev server is only here to help you iterate on and preview the contents and code. If you need to poll values (or a file server) live, you would need to do it in client-side javascript.
hope this helps