In normal create-react-app React application, I am trying to fetch markdown files inside React app and render it via other packages. Now it’s working locally both in development and production server (build).
After deploying it in Github pages (using gh-pages package), everything is working fine, but only “.md” files are not getting fetched even though it’s there in folder
- Build folder to see what all files I have: Link
- Fetching markdown file from production link: Link
- Fetching random text file: Link
Quick observation, Yes, I can access text file but how can I allow Github pages to serve markdown file as well ?
For future reference in case if links break, I am trying to fetch it like
"DOMAIN"/static/media/random.md # Error 404 "DOMAIN"/static/media/random.txt # Works
I observe, if I add frontmatter key value pair in markdown, then I am no longer able to download the file via
But if I remove markdown
--- string, then I can download it. Why this behaviour ? How can I overcome this ?