How to deploy markdown files in quick start in the document in vercel? #2000
-
https://remix.run/docs/en/v1/tutorials/blog#pulling-from-a-data-source // relative to the server output not the source!
const postsPath = path.join(__dirname, "..", "posts"); However, the code cannot query the folder in the local environment const postsPath = path.resolve("posts") However, neither of these two methods can query the folder of markdown files on vercel After I built it locally, I found that the markdown file was not packaged. How can I solve this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Using the file system is not supported in Vercel serverless functions. In the Remix Discord Vercel Channel (good resource) some people report that even using this Vercel Guide they cannot make it work. You can store your files in an external database (e.g. S3 oder Cloud Storage) or use the GitHub SDK to fetch the files from GitHub. |
Beta Was this translation helpful? Give feedback.
Using the file system is not supported in Vercel serverless functions. In the Remix Discord Vercel Channel (good resource) some people report that even using this Vercel Guide they cannot make it work.
You can store your files in an external database (e.g. S3 oder Cloud Storage) or use the GitHub SDK to fetch the files from GitHub.