I am using GitHub Pages to host my website. I have a PDF file that I want visitors to be able to open directly in a browser. But when I upload the PDF file to GitHub Pages and l
You can link it this way
PDF Doc
Then, when you push to GitHub page, you will see your pdf file path as so
https://userName.github.io/repoName/static/media/pdfFileName.hashNumber.pdf
I believe it works if you import the file instead of using require as well but I haven't tested with that.