So, here is the problem I am facing:
I am attempting to pre-render my site at build time with react-snap. This all works fine. However, now that I have the CMS that creates posts, I need a page of the app to PULL in all the files in a directory of the source tree so that I can then import them dynamically.
Obviously, Netlify cannot run a node server, however, during the BUILD time, I was wondering if you can use node? I have a node script that will access the filesystem and return the files back to the site.
However, I then attempted to spin this up via a function and use that function in the pre-render during the build (It worked in netlify dev) However, it turns out that functions live in a different space so apparently cannot access your built sites directory/file system.
Does anyone have an idea on how I can access my filesystem at build time to pull ALL files (unknown names) from a directory (posts). All I would need is the names of the files, not the content itself (maybe).
Is there a way in NetlifyCMS to generate a JSON of all the .md posts made during build? (That would make it easier haha)
Thanks in advance.