znhw
March 17, 2024, 7:42am
1
however, it can fetch the front matter like the title of the markdown file, but when i try to click into the page…it says 500 internal server error.
the log gives the error message that there’s no such directory / file.
does anyone know how to fix this? i tried it on vercel, and also got the same issue.
thanks a lot!
If your issue span across multiple platforms, it sounds like something might be misconfigured in the project. We can try to take a look once you provide your site name and steps to reproduce the issue.
znhw
March 17, 2024, 1:02pm
4
Hello! I moved my post folder containing the markdown files into public folder, so now the folder/markdown files are built.
However, it still returns “no such file or directory” in production mode.
In dev mode, this works:
const folder = “public/posts/”
const file = ${folder}${slug}.md
but since i know public doesnt work in built… so even if “/posts/” it still doesnt work.
znhw
March 17, 2024, 3:06pm
6
znhw
March 18, 2024, 5:11am
9
hey there, thanks! I’ve fixed the problem by adding the link to included_files in the netlify.toml
Excellent, glad you were able to resolve this! Thanks for following up!